tags:

views:

1193

answers:

2

I need to display a set of markers on a google map. In addition, I need to show additional markers, loaded dynamically, when the user pans the maps.

The number of markers could be in thousands, out of which 30-50 need to be displayed initially. Other markers need to be loaded and displayed only when user pans over an area that contains markers. I thought about using marker managers but i am not sure if markers can be fed to the marker manager dynamically. I want something more like this map. Notice how images load when you pan the map and garbage-collected when you pan away.

Marker clustering is not important but might be nice.

+1  A: 

maybe something like geocubes helps

+1  A: 

I am doing this with clustering on a dataset of several thousand markers. This is how I'm doing it: When the 'moveend' event is fired, I get the bounds of the map and send an ajax request to the server. I get the markers from your DB which are in the bounds and send them back to the client. If you have questions about a specific part of the process, just let me know.

Also, with the Marker Manager, I believe that you can add markers dynamically.

Chris B
Got it! I wonder if it is possible to use marker manager with AJAX instead of writing my own moveend implementation? Markermanager takes care of few others chores I think.
Salman A
The only drawback to Marker Manager is that it doesn't cluster. You just tell it which markers you want to be visible at which zoom, and it shows/hides them as you move around.
Chris B
Clustering is not required, I am asked to lock the zoom and show all markers. Problem solved!
Salman A