all points have a field marker with the path of svg icon. so i don’t know how to set the marker icon acoording to its value… I guess it’s through the ‘properties’ parameter in the geolayer widget but i don’t know how to do that.
In $:/plugins/tiddlywiki/geospatial/geomap.js, the refreshMap() function contains these lines:
var myIcon = new $tw.Leaflet.Icon({
iconUrl: $tw.utils.makeDataUri(this.wiki.getTiddlerText("$:/plugins/tiddlywiki/geospatial/images/markers/pin"),"image/svg+xml"),
iconSize: [iconHeight * iconProportions, iconHeight], // Size of the icon
iconAnchor: [(iconHeight * iconProportions) / 2, iconHeight], // Position of the anchor within the icon
popupAnchor: [0, -iconHeight] // Position of the popup anchor relative to the icon anchor
});
Note that $:/plugins/tiddlywiki/geospatial/images/markers/pin is a hard-coded reference to an SVG+XML image tiddler. This means that there is currently no way to specify alternative marker icons.
I recommend submitting a GitHub issue to suggest alternative marker icons to be specified via the properties parameter, so you could then write something like this:
if the properties doesn’t have a marker attribute or the marker tiddler is missing, it would default to using the current hard-coded marker image tiddler.