Open btbowden opened 4 years ago
I implemented a time delay on the clusterer constructor and it now works.
setTimeout(function () {
// Add a marker clusterer to manage the markers.
const clusterOptions = {
imagePath: "/Assets/Images/MarkerClusterer/",
gridSize: 50,
maxZoom: 15
};
localsLocation.MarkerCluster = new MarkerClusterer(localsLocation.Map, localsLocation.Markers, clusterOptions);
}, timeout);
I'm using the spidifier with the marker clusterer plugin and it works great, however there is one problem. I'm activating the marker click programmatically, which does fire the marker event, but doesn't open the info window or spidering as expected.
click event that gets fired: google.maps.event.trigger(localsLocation.Markers[index], 'spider_click');
event code: google.maps.event.addListener(marker, 'spider_click', function (e) { // 'spider_click', not plain 'click' marker.setZIndex(google.maps.Marker.MAX_ZINDEX); localsLocation.infoWindow.setContent("
If I manually click the marker it works as expected though.