1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2025-08-09 23:33:48 +00:00

remove function-wrapper from geospatial plugin

This commit is contained in:
pmario 2025-03-16 17:17:53 +01:00
parent 279f2d7bd3
commit 8c044b1945
10 changed files with 9 additions and 32 deletions

View File

@ -6,7 +6,7 @@ module-type: library
Geospatial utilities Geospatial utilities
\*/ \*/
(function(){
"use strict"; "use strict";
var turf = require("$:/plugins/tiddlywiki/geospatial/turf.js"); var turf = require("$:/plugins/tiddlywiki/geospatial/turf.js");
@ -34,5 +34,3 @@ exports.parsePoint = function(str) {
// Return the string now we know it is a valid GeoJSON Point // Return the string now we know it is a valid GeoJSON Point
return json; return json;
} }
})();

View File

@ -6,7 +6,7 @@ module-type: filteroperator
Filter operators for geospatial helpers Filter operators for geospatial helpers
\*/ \*/
(function(){
"use strict"; "use strict";
var turf = require("$:/plugins/tiddlywiki/geospatial/turf.js"); var turf = require("$:/plugins/tiddlywiki/geospatial/turf.js");
@ -17,5 +17,3 @@ exports.geopoint = function(source,operator,options) {
alt = $tw.utils.parseNumber(operator.operands[2] || "0"); alt = $tw.utils.parseNumber(operator.operands[2] || "0");
return [JSON.stringify(turf.point([long,lat,alt]))]; return [JSON.stringify(turf.point([long,lat,alt]))];
}; };
})();

View File

@ -6,7 +6,6 @@ module-type: filteroperator
Filter operators for geospatial lookup Filter operators for geospatial lookup
\*/ \*/
(function(){
"use strict"; "use strict";
var turf = require("$:/plugins/tiddlywiki/geospatial/turf.js"), var turf = require("$:/plugins/tiddlywiki/geospatial/turf.js"),
@ -38,5 +37,3 @@ function getPolygonsContainingPoint(featureCollection,point) {
}); });
return properties; return properties;
} }
})();

View File

@ -6,7 +6,7 @@ module-type: filteroperator
Filter operators for geospatial measurement Filter operators for geospatial measurement
\*/ \*/
(function(){
"use strict"; "use strict";
var turf = require("$:/plugins/tiddlywiki/geospatial/turf.js"), var turf = require("$:/plugins/tiddlywiki/geospatial/turf.js"),
@ -47,5 +47,3 @@ exports.geonearestpoint = function(source,operator,options) {
return []; return [];
} }
}; };
})();

View File

@ -6,7 +6,7 @@ module-type: filteroperator
Filter operators for open location code conversions Filter operators for open location code conversions
\*/ \*/
(function(){
"use strict"; "use strict";
var openlocationcode = require("$:/plugins/tiddlywiki/geospatial/openlocationcode.js"), var openlocationcode = require("$:/plugins/tiddlywiki/geospatial/openlocationcode.js"),
@ -48,5 +48,3 @@ exports["olc-encode"] = function(source,operator,options) {
} }
return [olc]; return [olc];
}; };
})();

View File

@ -6,7 +6,7 @@ module-type: filteroperator
Filter operators for geospatial transformation Filter operators for geospatial transformation
\*/ \*/
(function(){
"use strict"; "use strict";
var turf = require("$:/plugins/tiddlywiki/geospatial/turf.js"), var turf = require("$:/plugins/tiddlywiki/geospatial/turf.js"),
@ -80,6 +80,3 @@ function geojsonOp(geojsonObjects, op) {
}); });
return turf.featureCollection(resultFeatures); return turf.featureCollection(resultFeatures);
} }
})();

View File

@ -6,7 +6,7 @@ module-type: startup
Geospatial initialisation Geospatial initialisation
\*/ \*/
(function(){
"use strict"; "use strict";
// Export name and synchronous status // Export name and synchronous status
@ -71,5 +71,3 @@ exports.startup = function() {
} }
}); });
}; };
})();

View File

@ -6,9 +6,7 @@ module-type: widget
geobaselayer widget to represent a base layer for a geomap widget. Clone of the data widget geobaselayer widget to represent a base layer for a geomap widget. Clone of the data widget
\*/ \*/
(function(){
"use strict"; "use strict";
exports.geobaselayer = require("$:/core/modules/widgets/data.js").data; exports.geobaselayer = require("$:/core/modules/widgets/data.js").data;
})();

View File

@ -6,9 +6,7 @@ module-type: widget
geolayer widget to represent a layer for a geomap widget. Clone of the data widget geolayer widget to represent a layer for a geomap widget. Clone of the data widget
\*/ \*/
(function(){
"use strict"; "use strict";
exports.geolayer = require("$:/core/modules/widgets/data.js").data; exports.geolayer = require("$:/core/modules/widgets/data.js").data;
})();

View File

@ -6,7 +6,7 @@ module-type: widget
Leaflet map widget Leaflet map widget
\*/ \*/
(function(){
"use strict"; "use strict";
var Widget = require("$:/core/modules/widgets/widget.js").widget; var Widget = require("$:/core/modules/widgets/widget.js").widget;
@ -348,6 +348,3 @@ GeomapWidget.prototype.refresh = function(changedTiddlers) {
}; };
exports.geomap = GeomapWidget; exports.geomap = GeomapWidget;
})();