Prevent removed markers reapparing after toggling layer visibility
This commit is contained in:
parent
3e095c0ae9
commit
05bf3e8b48
@ -67,7 +67,7 @@ export default defineComponent({
|
||||
return;
|
||||
}
|
||||
|
||||
area.remove();
|
||||
props.layerGroup.removeLayer(area);
|
||||
layers.delete(id);
|
||||
},
|
||||
|
||||
|
@ -67,7 +67,7 @@ export default defineComponent({
|
||||
return;
|
||||
}
|
||||
|
||||
circle.remove();
|
||||
props.layerGroup.removeLayer(circle);
|
||||
layers.delete(id);
|
||||
},
|
||||
|
||||
|
@ -66,7 +66,7 @@ export default defineComponent({
|
||||
return;
|
||||
}
|
||||
|
||||
line.remove();
|
||||
props.layerGroup.removeLayer(line);
|
||||
layers.delete(id);
|
||||
},
|
||||
|
||||
|
@ -65,7 +65,7 @@ export default defineComponent({
|
||||
return;
|
||||
}
|
||||
|
||||
marker.remove();
|
||||
props.layerGroup.removeLayer(marker);
|
||||
layers.delete(id);
|
||||
},
|
||||
|
||||
|
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user