If your application is set up to load markers and shapes from a server
based on the current bounds, it seems like a good idea to "garbage
collect" items that are no longer within the current bounds. Doesn't
look like there is built-in support for this (?), so I'm curious what
solutions people have come up with.

I keep a map of items and their bounds. Then whenever the view bounds
change ("idle" event) I go through that map and call setMap(null) on
items whose bounds no longer overlap with the current view bounds. But
there may be a better approach?

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps JavaScript API v3" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-maps-js-api-v3?hl=en.

Reply via email to