views:

704

answers:

3

We started using Google Maps on our web application rather extensively. It worked fine at the beginning, but as we add more markers we find that the performance are not quite there. Although I'm quite sure we don't use it in the most efficient way.

I am looking for information about Google Maps best practices and tips'n tricks. Any suggestions?

+1  A: 
  • Limit markers to what's visible (ie, understand the window boundaries, and only show markers that fall inside the window)
  • Learn to listen for various map activities and react - such as viewpoint moves, zooming, etc - to update the markers
  • Don't show markers that overlap significantly - show only one marker (perhaps a different shade or color to denote there are several points at this marker) and let the user zoom in if they want to see the individual markers. Use the tooltip to show a zoomed in window if you want to get fancy.
Adam Davis
+3  A: 

Use Marker Manager.

Diodeus
+6  A: 

You might find some good ideas in this article, which compares several methods of handling large amounts of markers.

Marker Manager has some limitations, depending on what you're trying to accomplish; for instance, it doesn't allow every marker to be available from every zoom level. I created a clustering function based on the principles discussed in this tutorial. It uses the Static Maps API in PHP, but the principles behind the clustering can be used however you want.

Update: This clustering utility was just released: MarkerClusterer

Chris B