forked from MapComplete/MapComplete
Fix: stabilize user settings
This commit is contained in:
parent
6c9f660938
commit
4fd76cfce7
3 changed files with 21 additions and 7 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue