Google Maps API v3 - How to clear overlays?

前端 未结 7 2091
野性不改
野性不改 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 01:20

    I found another solution and it works very good it will remove all overlays that exist on the map

    gmap.overlayMapTypes.setAt( 0, null);
    

    while gmap is your map object

    0 讨论(0)
提交回复
热议问题