{ map.updateMapPadding(); location.locked = true; // @ts-expect-error - not typed window.map = map.value; // const worldUrl = await getPMTiles("world"); // if(worldUrl) { map.value!.addSource("ne2_shaded", { // TODO: rename to world type: "vector", url: "pmtiles://world", attribution: "Natural Earth", // maxzoom: 6 }) // @ts-expect-error - not typed correctly worldLayers.forEach(l => map.value!.addLayer(l)); // } // const url = await getPMTiles("tiles"); // console.log(url) // if(url) { map.value!.addSource("openmaptiles", { type: "vector", url: "pmtiles://tiles" }) // @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} {#if saved.home} 9 ? "/img/saved/home.png" : "/img/saved/small.png"} alt="Home Marker" bind:this={homeMarker} style="width: 32px;" /> {/if} {#if saved.school} 9 ? "/img/saved/school.png" : "/img/saved/small.png"} alt="School Marker" bind:this={schoolMarker} style="width: 32px;" /> {/if} {#if saved.work} 9 ? "/img/saved/work.png" : "/img/saved/small.png"} alt="Work Marker" bind:this={workMarker} style="width: 32px;" /> {/if}