I want to create a cluster with a specific value stored in the marker. Is this possible?
Asked
Active
Viewed 403 times
-2
-
Potentially. Please provide some more details about what you mean by that (a [mcve] that demonstrates the issue would be helpful). – geocodezip Jan 13 '22 at 14:38
-
Does this answer your question? [Google Maps Api v3, custom Cluster icon](https://stackoverflow.com/questions/4416089/google-maps-api-v3-custom-cluster-icon) – PaulCrp Jan 14 '22 at 23:25
1 Answers
-1
You can override the image path of the marker cluster like this
let markers = [marker1, marker2, marker3]; // list of markers with the specific value
markerClusterOptions = {
styles: [
{
height: 53,
width: 53,
url: YOUR_ICON_PATH
}
]
};
let markerCluster = new MarkerClusterer(map, markers, markerClusterOptions);
NB: styles
is a list and you can have more than one style depending for exemple the height
and width
.

PaulCrp
- 624
- 1
- 8
- 19