Removing Directions markers from the Google Maps API V3

后端 未结 2 1099
独厮守ぢ
独厮守ぢ 2020-12-28 14:31

To remove a normal marker from a map, I understand you simply call marker.setMap(null), but when implementing the Google Maps directions services, it automatically adds mark

2条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-28 15:29

    I had a similar problem. The previous solution did not help me. But I tried this:

    var directionsDisplay = new google.maps.DirectionsRenderer({suppressMarkers: true});
    And it's work.

提交回复
热议问题