1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2025-01-15 11:45:40 +00:00

Fix geospatial plugin map state loading (#8511)

This commit is contained in:
btheado 2024-09-30 09:49:33 -04:00 committed by GitHub
parent 0aa9cf6669
commit 7bf2fee15e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -292,7 +292,7 @@ GeomapWidget.prototype.setMapView = function() {
this.map.setMaxZoom($tw.utils.parseInt(this.getAttribute("maxZoom")));
}
// Set the view to the content of the state tiddler
var stateTiddler = this.geomapStateTitle && this.wiki.getTiddler(this.geomapStateTitle);
var stateTiddler = this.getAttribute("state") && this.wiki.getTiddler(this.getAttribute("state"));
if(stateTiddler) {
this.map.setView([$tw.utils.parseNumber(stateTiddler.fields.lat,0),$tw.utils.parseNumber(stateTiddler.fields.long,0)], $tw.utils.parseNumber(stateTiddler.fields.zoom,0));
return true;