{ map.updateMapPadding(); location.locked = true; // @ts-expect-error - not typed window.map = map.value; map.value!.addSource("ne2_shaded", { // TODO: rename to world type: "vector", url: await getPMTilesURL("world"), attribution: "Natural Earth", }); // @ts-expect-error - not typed correctly worldLayers.forEach((l) => map.value!.addLayer(l)); map.value!.addSource("openmaptiles", { type: "vector", url: (await hasPMTiles("tiles")) ? await getPMTilesURL("tiles") : "pmtiles://https://trafficcue-tiles.picoscratch.de/germany.pmtiles", }); // @ts-expect-error - not typed correctly layers.forEach((l) => map.value!.addLayer(l)); }} onclick={(e) => { if (view.current.type == "main" || view.current.type == "info") { pin.dropPin(e.lngLat.lat, e.lngLat.lng); pin.showInfo(); } }} onmove={(e) => { // @ts-expect-error - not typed if (e.reason !== "location") { location.locked = false; } }} > {#if routing.currentTrip && DEBUG_POINTS} {/if} {#if pin.isDropped} {/if} {#if location.available}
{/if} {#each hazards as hazard (hazard.latitude + "-" + hazard.longitude)} {/each}