diff --git a/src/components/map/vector/Areas.vue b/src/components/map/vector/Areas.vue index 718de5c..b98ad39 100644 --- a/src/components/map/vector/Areas.vue +++ b/src/components/map/vector/Areas.vue @@ -67,7 +67,7 @@ export default defineComponent({ return; } - area.remove(); + props.layerGroup.removeLayer(area); layers.delete(id); }, diff --git a/src/components/map/vector/Circles.vue b/src/components/map/vector/Circles.vue index 01c2900..7a864b5 100644 --- a/src/components/map/vector/Circles.vue +++ b/src/components/map/vector/Circles.vue @@ -67,7 +67,7 @@ export default defineComponent({ return; } - circle.remove(); + props.layerGroup.removeLayer(circle); layers.delete(id); }, diff --git a/src/components/map/vector/Lines.vue b/src/components/map/vector/Lines.vue index f6b82b0..289bda5 100644 --- a/src/components/map/vector/Lines.vue +++ b/src/components/map/vector/Lines.vue @@ -66,7 +66,7 @@ export default defineComponent({ return; } - line.remove(); + props.layerGroup.removeLayer(line); layers.delete(id); }, diff --git a/src/components/map/vector/Markers.vue b/src/components/map/vector/Markers.vue index 43e1306..2619e11 100644 --- a/src/components/map/vector/Markers.vue +++ b/src/components/map/vector/Markers.vue @@ -65,7 +65,7 @@ export default defineComponent({ return; } - marker.remove(); + props.layerGroup.removeLayer(marker); layers.delete(id); }, diff --git a/src/leaflet/layer/DynmapLayerGroup.ts b/src/leaflet/layer/DynmapLayerGroup.ts index 13a503d..48fdb3c 100644 --- a/src/leaflet/layer/DynmapLayerGroup.ts +++ b/src/leaflet/layer/DynmapLayerGroup.ts @@ -103,7 +103,7 @@ export default class DynmapLayerGroup extends LayerGroup { removeLayer(layer: Layer): this { this._zoomLimitedLayers.delete(layer); - return super.addLayer(layer); + return super.removeLayer(layer); } update(options: DynmapLayerGroupOptions) {