Ressurect marker to 'add a new item', but only on long press

This commit is contained in:
Pieter Vander Vennet 2024-06-20 03:30:14 +02:00
parent 9deae9e659
commit 800a4ae849
12 changed files with 111 additions and 49 deletions

View file

@ -27,6 +27,7 @@
let _map: Map
onMount(() => {
const { lon, lat } = mapProperties?.location?.data ?? { lon: 0, lat: 0 }
const rasterLayer: RasterLayerProperties = mapProperties?.rasterLayer?.data?.properties
@ -72,8 +73,13 @@
})
onDestroy(async () => {
await Utils.waitFor(250)
try{
if (_map) _map.remove()
map = null
}catch (e) {
console.error("Could not destroy map")
}
})
</script>