Fix: stabilize user settings

This commit is contained in:
Pieter Vander Vennet 2025-06-16 20:30:51 +02:00
parent 6c9f660938
commit 4fd76cfce7
3 changed files with 21 additions and 7 deletions

View file

@ -756,7 +756,12 @@ export class MapLibreAdaptor implements MapProperties, ExportableMap {
}
if (!showScale) {
if (this.scaleControl) {
map.removeControl(this.scaleControl)
try {
map.removeControl(this.scaleControl)
} catch (e) {
console.warn("Could not remove scale control, underlying map might have had a reset")
}
this.scaleControl = undefined
}
return