What's the equivalent of map.clearOverlays() ?

171 views
Skip to first unread message

mp-

unread,
Jun 16, 2009, 6:11:08 PM6/16/09
to Google Maps JavaScript API v3
What's the v3 API equivalent of map.clearOverlays(), where I can
programatically remove all Markers from the map.

Thanks

pamela (Google Employee)

unread,
Jun 17, 2009, 12:59:43 AM6/17/09
to google-map...@googlegroups.com
Hi mp-

We have not included a method for that. You should store references to
your marker objects in an array, and then call .set_map(null) on each
of the objects.

- pamela
Reply all
Reply to author
Forward
0 new messages