I m using markerclusterer in my React-redux project to draw markers for all the companies. I have 3 companies having the same address. When I zoom in to the Map, I can see the number 3 (marker cluster) and when further zoomed i could see only 1 marker (for all the 3 companies). I need to display a single marker (filter companies from markerClusterer that have same address) and when marker is clicked, open dialog box to show company details. Initially when map is loaded, the markers are rendered (code below:)
companies.map((company) => {
this.marker = new google.maps.Marker({
map: map,
position: {lat: parseFloat(company.latitude),
lng: parseFloat(company.longitude)},
icon: {url:'/src/images/blue_marker.png',
size: new google.maps.Size(30, 30)},
title: company.name + ' ' + company.vacancy.vacancy
});
options = {
imagePath: '/src/images/m',
maxZoom: 15,
zoomOnClick: false
};
var markerCluster = new MarkerClusterer(map, markers, options);
markerCluster.setMaxZoom(15);