mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-28 08:02:41 +02:00
Remove coverage polygon from map when we are removed from the map. Fixes #38
This commit is contained in:
@@ -192,6 +192,12 @@ L.MarkerClusterGroup = L.FeatureGroup.extend({
|
||||
shownPolygon = null;
|
||||
}
|
||||
}, this);
|
||||
map.on('layerremove', function (opt) {
|
||||
if (shownPolygon && opt.layer === this) {
|
||||
map.removeLayer(shownPolygon);
|
||||
shownPolygon = null;
|
||||
}
|
||||
}, this);
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user