Hi. Can someone help me work out why i have a stray infowindow on this map:
http://developer.martinpearman.co.uk/www.auto-stop.cz/20100405/index.php Click the pink marker lower right of map, the infowindow opens - 6 members located here. Click 'Fit map to member locations' and the map pans and zooms to display the 6 markers in that cluster. The pink cluster marker has been removed from the map so it's infowindow automatically closes. All works fine. However if you reload the map (or use the map control 'Return to last result') and click that same pink marker again, then click one of the 6 member links, the pink cluster marker is removed and the selected member marker added to the map and it's infowindow opened. Now close the member marker's infowindow and the cluster marker is added back to the map and it's infowindow automatically opens. Finally click the 'Fit map to member locations' link, the map pans and zooms as desired, the cluster marker is removed from the map BUT the infowindow remains open. How can that happen? If the infowindow is opened using the GMarker openInfoWindow() method and that marker is removed from the map then the infowindow is always (i think?) automatically closed. The code to debug is here: http://developer.martinpearman.co.uk/www.auto-stop.cz/20100405/ClusterMarker.js The setDoNotCluster() method is where the cluster marker's infowindow is automatically reopened. I thought maybe i was getting closure on $marker._clusterMarker when the infowindowclose event listener is created. So when the code triggers a click event on $marker._clusterMarker, it was triggering a click on the cluster marker that was originally physically clicked on. That cluster marker has been removed from the map and after the refresh() method is called a new cluster marker created and added to the map. So i added a seconds timestamp to each cluster marker as it's created, which is displayed at the bottom of each cluster marker's infowindow. The infowindow which opens after triggering a click does not have the same timestamp as the infowindow of the original timestamp - so i've ruled out the problem being an unwanted closure on $marker._clusterMarker. The infowindow remains open after it's marker has been removed from the map only if it is automatically reopened - close the infowindow and reopen it by clicking on the cluster marker and everything functions fine. Anyone got any ideas? Thanks. Martin. -- You received this message because you are subscribed to the Google Groups "Google Maps API" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-maps-api?hl=en.
