handle waypoint symbols

This commit is contained in:
vcoppe
2024-08-08 17:52:11 +02:00
parent 8dee6db813
commit f10b18afe2
8 changed files with 199 additions and 24 deletions

View File

@@ -120,7 +120,10 @@ export class OverpassLayer {
}
onHover(e: any) {
overpassPopupPOI.set(e.features[0].properties);
overpassPopupPOI.set({
...e.features[0].properties,
sym: overpassQueryData[e.features[0].properties.query].symbol ?? ''
});
overpassPopup.setLngLat(e.features[0].geometry.coordinates);
overpassPopup.addTo(this.map);
this.map.on('mousemove', this.maybeHidePopupBinded);

View File

@@ -7,7 +7,6 @@
import { onMount } from 'svelte';
import { _ } from 'svelte-i18n';
import { dbUtils } from '$lib/db';
import { get } from 'svelte/store';
let popupElement: HTMLDivElement;
@@ -89,7 +88,8 @@
},
name: name,
desc: desc,
cmt: desc
cmt: desc,
sym: $overpassPopupPOI.sym
});
}}
>