mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2026-01-30 23:00:24 +00:00
* remove blks first try * dprint.json seems to be OK, some forgotten functions * add some more space-after-keyword settings * server remove blks * add **/files to dprint exclude * dprint.js fixes a typo * add boot.js and bootprefix.js to dprint exclude * dprint change dprint.json * add dprint fmt as script * remove jslint comments * fix whitespace * fix whitespace * remove function-wrapper from geospatial plugin * fix whitespace * add function wrapper to dyannotate-startup * remove dpring.json
20 lines
545 B
JavaScript
20 lines
545 B
JavaScript
/*\
|
|
title: $:/plugins/tiddlywiki/geospatial/operators/helper.js
|
|
type: application/javascript
|
|
module-type: filteroperator
|
|
|
|
Filter operators for geospatial helpers
|
|
|
|
\*/
|
|
|
|
"use strict";
|
|
|
|
var turf = require("$:/plugins/tiddlywiki/geospatial/turf.js");
|
|
|
|
exports.geopoint = function(source,operator,options) {
|
|
var lat = $tw.utils.parseNumber(operator.operands[0] || "0"),
|
|
long = $tw.utils.parseNumber(operator.operands[1] || "0"),
|
|
alt = $tw.utils.parseNumber(operator.operands[2] || "0");
|
|
return [JSON.stringify(turf.point([long,lat,alt]))];
|
|
};
|