views:

171

answers:

2

Hi,

Bit stuck on this one. I am retrieving a list of geo coords via JSON and popping them onto a google map. All is working well except in the instance when I have two or more markers on the exact same spot. The API only displays 1 marker - the top one. This is fair enough I suppose but would like to find a way to display them all somehow.

I've searched google and found a few solutions but they mostly seem to be for V2 of the API or just not that great. Ideally I'd like a solution where you click some sort of group marker and that then shows the markers clustered around the spot they are all in.

Anybody had this problem or similar and would care to share a solution? Thanks in advance!

A: 

Check out Marker Clusterer for V3 - this library clusters nearby points into a group marker. The map zooms in when the clusters are clicked. I'd imagine when zoomed right in you'd still have the same problem with markers on the same spot though.

Sonia
Yep, taken a look at that handy little library but it still doesn't seem to overcome the issue. I'm making a service locator for a company that sometimes has more than one service in the same office block and hence the exact same geo coords. I can show the different services in the one info window but this just doesn't seem to be the most elegant solution...
Louzoid
A: 

For situations where there are multiple services in the same building you could offset the markers just a little, (say by .001 degree), in a radius from the actual point. This should also produce a nice visual effect.

Chaoley