For a few thousand markers, I recommend MarkerManager.

http://gmaps-utility-library-dev.googlecode.com/svn/tags/markermanager/

Unless you've got huge amounts of extra data (e.g. really large 
infowindow html contents) associated with each marker, the memory 
required for the hidden markers is fairly modest. Only the displayed 
markers have significant memory costs.

You could request markers that fit in the current viewport from your 
server whenever the map moves, but you need to be more sophisticated 
than that if you want the display to work nicely. Problems with a 
simplistic server call include:
* Opening an infowindow can cause the map to move, if you then fetch 
markers for the new view and remove the existing marker, the API closes 
the infowindow when the marker it was attached to is removed.
* If the user zooms out to a zoom level that shows the whole Earth, you 
don't want your server to return 1100 markers, because that's where we 
came in. So you have to also set a limit of the number of markers that 
your server returns.
* Expect a visible lag when the refresh occurs. This can make things 
look ugly or behave awkwardly for your users, particularly when they 
make small map movements. Adding some padding around the viewport when 
making your server request, and then not requesting a refresh if the map 
moves within the extended area can ameliorate this.

-- 
Mike Williams
http://econym.org.uk/gmap



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Maps API" group.
To post to this group, send email to google-maps-api@googlegroups.com
To unsubscribe from this group, send email to 
google-maps-api+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-maps-api?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to