I am using Google Maps API V3 in javascript. I have multiple markers that are in a close proximity to each other. I want to make it so that when a user clicks a marker the infowindow of that marker and any markers overlapping it will open (I need to bubble the event click to all the other markers that overlap the clicked pixel). I can get the infowindow of the highest z-indexed marker to open, but I need to open the windows of the markers underneath too. Can this be done, and if so how?
Call setPosition() on the info window, or. Attach the info window to a new marker using the InfoWindow. open() method. Note: If you call open() without passing a marker, the InfoWindow will use the position specified upon construction through the InfoWindowOptions object literal.
2048 characters in URL is just under 100 GeoCode values. So, again no more than 100 markers.
Try OverlappingMarkerSpiderfier
https://github.com/jawj/OverlappingMarkerSpiderfier
There is a demo here - http://jawj.github.com/OverlappingMarkerSpiderfier/demo.html
It attempts to give the same 'clustering' behaviour as the Earth Api.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With