On Jul 20, 1:16 pm, the best group <khaledne...@gmail.com> wrote:
>
> I have a v2 map which has many makers, polygons, and lines, but I need
> to know how to search for each maker, or polygon and remove it from
> the map (so the map will be cleaned as it has been initialized first
> time)

If you want to remove everything, then you don't need to look through
a list of overlays.
http://code.google.com/apis/maps/documentation/javascript/v2/reference.html#GMap2.clearOverlays

You'll need to set the centre and zoom back to the starting point. If
you save the initial state
http://code.google.com/apis/maps/documentation/javascript/v2/reference.html#GMap2.savePosition
then that's a one-liner as well.

-- 
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 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