Open narutaro opened 1 year ago
The drawPoints functionality only accepts an array of coordinate data of markers and options to configure marker elements, but as of now, there is no way to set icons/colors to each marker/location.
You could try creating a custom marker with specific icons/colors using maplibregl marker and add it to a map.
@sreeramsama - thank you for your reply. I will go with the MapLibre API for now.
const m = new maplibregl.Marker({
color: "#e50112",
})
I like to create an application to show a different icon for each location, or change the color of the icon depending on location conditions, is that possible?
I looked at this
drawPoints
-markerImageElement
example but it looks that the same icon will be applied to all icons on the map.Is there a sample code available?