const renderer = {
render: function ({ count, position }) {
return new google.maps.Marker({
label: {text: count.toString(), color: 'white', fontSize: '12px'},
position,
icon: icon1,
title: 'Zoom in to view resources in this area',
// adjust zIndex to be above other markers
zIndex: Number(google.maps.Marker.MAX_ZINDEX) + count,
});
}
};
const renderer2 = {
render: function ({ count, position }) {
return new google.maps.Marker({
label: {text: count.toString(), color: 'white', fontSize: '12px'},
position,
icon: Icon2,
title: 'Zoom in to view resources in this area',
// adjust zIndex to be above other markers
zIndex: Number(google.maps.Marker.MAX_ZINDEX) + count,
});
}
};
const clusterer1 = new MarkerClusterer({
map,
markers,
renderer:renderer
});
const clusterer2 = new MarkerClusterer({
map,
markers: markers2,
renderer:renderer2
});