Skip to content

Default Map Markers don't show #100

@ogrotten

Description

@ogrotten

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>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions