Google Maps API v3: How to remove all markers?

后端 未结 30 3589
悲哀的现实
悲哀的现实 2020-11-22 05:36

In Google Maps API v2, if I wanted to remove all the map markers, I could simply do:

map.clearOverlays();

How do I do this in Google Maps A

30条回答
  •  说谎
    说谎 (楼主)
    2020-11-22 06:18

    The "set_map" function posted in both answers appears to no longer work in Google Maps v3 API.

    I wonder what happened

    Update:

    It appears Google changed their API such that "set_map" is not "setMap".

    http://code.google.com/apis/maps/documentation/v3/reference.html

提交回复
热议问题