You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi All,
I'm trying to create individual icons (images) or circular markers depending on the marker itself. Using the code below I was able to use images but only the same image for all markers. Is there a way to have different images for different markers and circular markers for others as well?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hi All,
I'm trying to create individual icons (images) or circular markers depending on the marker itself. Using the code below I was able to use images but only the same image for all markers. Is there a way to have different images for different markers and circular markers for others as well?
Thanks,
Eric
const options = {
markerStyle: {
initial: { image: '/pin.png' },
},
markers: [
{ name: 'Egypt', coords: [26.8206, 30.8025] },
{
name: 'United Kingdom',
coords: [55.3781, 3.4360],
// Add a marker image for this particular marker.
style: { image: '/different_pin.png' },
},
],
}
Beta Was this translation helpful? Give feedback.
All reactions