Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Solutions for many markers in the same coordinate, Google Map mashup

I am making a mashup where thumbnails will be shown over a google map.

The problem is that many thumbnails will share the same coordinate. So if I plot them like markers, they will be one on top of the other.

Have you seen any creative solution for this problem? Thanks

like image 507
Victor Avatar asked Jan 27 '10 23:01

Victor


1 Answers

Clustering is certainly useful, but it doesn't address the original question - which is how to display markers if they share the same exact coordinates. Google Maps API v3 simply doesn't do that. It just displays one of them.

Clustering solutions suggested by @RedBlueThing do not address this.

There are a couple of options. One was suggested by @Bryan - to do some pre-processing manually, and put descriptive information in the info window for the last marker.

Alternatively - which I prefer - is to pre-process the markers to just ever so slightly (10m or so) alter the coordinates of those that share the same exact location. If you can afford to give up that kind of level of precision. See one such solution here http://techxplorer.com/2010/02/05/managing-markers-with-the-same-coordinates-in-a-google-map/. I have further modified the code - see here https://gist.github.com/873142.

like image 77
avioing Avatar answered Jan 03 '23 17:01

avioing