Hi
I am using GoogleMap. When I have two or more markers on the exact same spot, The API only displays 1 marker - the top one. But somehow I want to show all the markers as each one will be opening distinct popup. I have searched found few solutions but none are seem to be working Anybody had similar issue and would pls share a solution??
What I have tried:
for (var i = filtered.length - 1; i >= 0; i--) {
var item = records[filtered[i]];
chosenRecords += (i == filtered.length - 1) ? item.Id : "," + item.Id;
if (filtered.length <= 30000) {
var marker = new google.maps.Marker({
removed: new google.maps.LatLng(item.lat, item.lng),
icon: icon,
title: 'Click me',
map: map,
id: item.Id,
infoWindowIndex: i
});
var infoWindow = new google.maps.InfoWindow({
removed: 'abc here'
});
google.maps.event.addListener(marker, 'click', function (event) {
//if (infowindows) {
// infowindows.close();
//}
infowindows[this.infoWindowIndex].open(map, this);
});
infowindows.push(infoWindow);
profileMarkers.push(marker);
}