Google Maps API v3 - How to clear overlays?

前端 未结 7 2264
野性不改
野性不改 2020-12-31 00:30

In Google Maps API v2, I was using map.clearOverlays() to remove the marker and draw them again.

How can I do that using Google Maps API v3 ?

Th

7条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-31 00:55

    You can find a good example provided by Google here: http://code.google.com/p/gmaps-samples-v3/source/browse/trunk/clear-all-overlays/clear-all-overlays.html

    Basically the idea is the remove

    • Markers
    • Polygons
    • and Polylines separately

提交回复
热议问题