mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-02-28 08:50:01 +00:00
Geomap: Add colour support for geolayers
This commit is contained in:
parent
1a0451ac9a
commit
94cf1bbe0d
@ -74,7 +74,13 @@ GeomapWidget.prototype.renderMap = function(domNode) {
|
||||
$tw.utils.each(this.wiki.filterTiddlers(this.geomapLayerFilter,this),function(title) {
|
||||
var tiddler = self.wiki.getTiddler(title);
|
||||
if(tiddler) {
|
||||
var layer = L.geoJSON($tw.utils.parseJSONSafe(tiddler.fields.text || "[]",[])).addTo(map);
|
||||
var layer = L.geoJSON($tw.utils.parseJSONSafe(tiddler.fields.text || "[]",[]),{
|
||||
style: function(geoJsonFeature) {
|
||||
return {
|
||||
color: tiddler.getFieldString("color") || "yellow"
|
||||
}
|
||||
}
|
||||
}).addTo(map);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user