forked from MapComplete/MapComplete
Chore: housekeeping
This commit is contained in:
parent
8178c5607b
commit
cd0d275965
73 changed files with 2105 additions and 2219 deletions
|
|
@ -27,7 +27,6 @@
|
|||
|
||||
let _map: Map
|
||||
onMount(() => {
|
||||
|
||||
const { lon, lat } = mapProperties?.location?.data ?? { lon: 0, lat: 0 }
|
||||
|
||||
const rasterLayer: RasterLayerProperties = mapProperties?.rasterLayer?.data?.properties
|
||||
|
|
@ -73,11 +72,10 @@
|
|||
})
|
||||
onDestroy(async () => {
|
||||
await Utils.waitFor(250)
|
||||
try{
|
||||
|
||||
if (_map) _map.remove()
|
||||
map = null
|
||||
}catch (e) {
|
||||
try {
|
||||
if (_map) _map.remove()
|
||||
map = null
|
||||
} catch (e) {
|
||||
console.error("Could not destroy map")
|
||||
}
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue