feat: add hazards
This commit is contained in:
@ -17,6 +17,8 @@
|
||||
} from "$lib/services/OfflineTiles";
|
||||
import { layers, worldLayers } from "$lib/mapLayers";
|
||||
import { PMTilesProtocol } from "svelte-maplibre-gl/pmtiles";
|
||||
import HazardMarker from "./HazardMarker.svelte";
|
||||
import { hazards } from "./hazards.svelte";
|
||||
|
||||
onMount(() => {
|
||||
window.addEventListener("resize", map.updateMapPadding);
|
||||
@ -178,4 +180,9 @@
|
||||
element={workMarker}
|
||||
/>
|
||||
{/if}
|
||||
|
||||
<!-- <HazardMarker hazard="bumpy-road" lat={51.347447} lon={7.4028181} /> -->
|
||||
{#each hazards as hazard (hazard.latitude + "-" + hazard.longitude)}
|
||||
<HazardMarker hazard={hazard.type} lat={hazard.latitude} lon={hazard.longitude} />
|
||||
{/each}
|
||||
</MapLibre>
|
||||
|
||||
Reference in New Issue
Block a user