mirror of
https://github.com/TiddlyWiki/TiddlyWiki5.git
synced 2026-04-29 00:34:55 +00:00
Prevent geospatial plugin exception when geomap contains empty geolayer widget (#8484)
* Prevent exception when geomap contains empty geolayer widget * Convert testcase widget into testcase tiddler
This commit is contained in:
@@ -262,10 +262,12 @@ GeomapWidget.prototype.refreshMap = function() {
|
||||
var bounds = null;
|
||||
$tw.utils.each(this.renderedLayers,function(layer) {
|
||||
var featureBounds = layer.layer.getBounds();
|
||||
if(bounds) {
|
||||
bounds.extend(featureBounds);
|
||||
} else {
|
||||
bounds = featureBounds;
|
||||
if(featureBounds.isValid()) {
|
||||
if(bounds) {
|
||||
bounds.extend(featureBounds);
|
||||
} else {
|
||||
bounds = featureBounds;
|
||||
}
|
||||
}
|
||||
});
|
||||
if(bounds) {
|
||||
|
||||
Reference in New Issue
Block a user