From 656eef67b105177e86400fc6ff6a753658766cd7 Mon Sep 17 00:00:00 2001 From: sronveaux Date: Mon, 28 Oct 2024 14:28:58 +0100 Subject: [PATCH] Corrected a map unbounding bug in MapOverlay --- src/components/modulecore/MapOverlay.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/modulecore/MapOverlay.vue b/src/components/modulecore/MapOverlay.vue index ce2a2e42..5054f508 100644 --- a/src/components/modulecore/MapOverlay.vue +++ b/src/components/modulecore/MapOverlay.vue @@ -33,7 +33,7 @@ export default { return { show: this.visible, position: this.coordinates, - olOverlay: null, + olOverlay: undefined, contentData: {} } }, @@ -97,7 +97,7 @@ export default { * Destroys the OpenLayers overlay control and removes it from the map. */ destroyOlOverlay () { - if (this.olOverlay) { + if (this.olOverlay && this.map) { this.map.removeOverlay(this.olOverlay); this.olOverlay = undefined; }