-
Notifications
You must be signed in to change notification settings - Fork 64
Open
Description
In the below code the markers don't show. They have showed in the past, but loading my repo after some time (August?) without change (far as I know), the markers don't show.
What could cause that? The code looks similar to the example code.
const hotels = [
{ label: 'St. Regis', lat: 38.9020975, lng: -77.0360535 },
{ label: 'Ritz Carlton', lat: 38.904444, lng: -77.049167 },
{ label: 'JW Marriott', lat: 38.8966, lng: -77.0315 },
{ label: 'AC Hotel', lat: 38.904301, lng: -77.0439 },
{ label: 'Mayflower', lat: 38.9044783, lng: -77.0398047 },
]
<div class="mx-auto">
<Geocoder accessToken={token} on:result={geoCodeResult} />
</div>
<div class="h-full w-full overflow-hidden rounded-lg">
<Map
accessToken={token}
style="mapbox://styles/mapbox/outdoors-v11"
bind:this={mapComponent}
on:ready={onReady}
on:click={console.log}
>
{#each hotels as hotel}
<Marker
lat={hotel.lat}
lng={hotel.lng}
label={hotel.label}
color={'red'}
popup={false}
/>
{/each}
</Map>
</div>
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels