On Jan 14, 10:17 am, Mike Armstrong <[email protected]> wrote: > Is there a way to loop through only markers that are within the > current view? For example, if I'm zoomed into a certain area, is there > a way to get the icons for only that specific area? Visible on the > screen? You only have to ask once: http://groups.google.com/group/google-maps-js-api-v3/browse_frm/thread/cb59783cec1f2216#
There is a way to tell which markers are visible. Get the bounds of the viewport (map.getBounds()) Test each marker to see if map.getBounds().contains(marker.getPosition()) Potential pitfalls: may need to wait for bounds to be available (bounds_changed event) before getting and using it. -- Larry > > Thanks, > > Mike -- 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.
