On May 12, 12:42 pm, Jets <[email protected]> wrote:
> Hi,
>
> I want to count the marker in the view area. If user zoom in then
> how many marker in that current map view. I was trying to use
> markermanager but its not working fine for me. Main problem is that
> i have more than 200 markers in a single time and i have implement
> some functionality like when map move then it will update again to
> find new location and create new markers. Is it any way to count
> the marker in the map view.

Returns the bounds of the visible area:
http://code.google.com/apis/maps/documentation/javascript/v2/reference.html#GMap2.getBounds

Tells you if a GLatLng is contained in that bounds:
http://code.google.com/apis/maps/documentation/javascript/v2/reference.html#GLatLngBounds.containsLatLng

Returns the GLatLng of a marker:
http://code.google.com/apis/maps/documentation/javascript/v2/reference.html#GMarker.getLatLng

So:
map.getBounds().containsLatLng(gmarkers[i].getLatLng())

will tell you if marker "gmarkers[i]" is in view.

  -- Larry

>
> Thanks,
> Jets...

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps API V2" 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-api?hl=en.

Reply via email to