{#await fetchPOI(lat, lng, 20).then((r) => { view.loading = false; return r; })} { pin.liftPin(); }} > {m["sidebar.info.dropped"]()}

{m.loading()}

{:then res} {#if res.elements.length === 0} { pin.liftPin(); }} > {m["sidebar.info.dropped"]()} © OpenStreetMap
{JSON.stringify(res, null, 2)}
{:else} {@const elements = sortByDistance(res.elements, lat, lng)} {@const tags = elements[0].tags} {@const firstElement = elements[0]} {@const ellat = firstElement.center?.lat || firstElement.lat!} {@const ellng = firstElement.center?.lon || firstElement.lon!} { pin.liftPin(); }} > {#if getIcon(tags)} {@const Icon = getIcon(tags)} {/if} {tags.name || (tags["addr:street"] ? tags["addr:street"] + " " + tags["addr:housenumber"] : "")}
{#if tags.email || tags["contact:email"]} {/if} {#if tags.website || tags["contact:website"]} {/if} {#if tags.phone || tags["contact:phone"]} {/if}
{#if dev.current == "true"} {/if}

{tags["addr:street"]} {tags["addr:housenumber"]}

{tags["addr:postcode"]} {tags["addr:city"]}

{#if tags.opening_hours} {/if} {#if tags.internet_access} {/if} {#if tags.amenity == "fuel"} {/if} {#if Object.keys(tags).some((key) => key.startsWith("payment:"))}

{m["sidebar.info.payment-methods"]()}

    {#each Object.entries(tags).filter( ([key]) => key.startsWith("payment:"), ) as [key, value] (key)} {key.replace("payment:", "")}{value == "yes" ? "" : ": " + value} {/each}
{/if} © OpenStreetMap {/if} {:catch err} { pin.liftPin(); }} > Dropped Pin

Error: {err.message}

{/await}