我已经使用google maps api绘制了圆圈,我想从地图上删除圆圈,circle.setMap(null);
无效。
var circleDetails = {
strokeColor: "#c4c4c4",
strokeOpacity: 0.35,
strokeWeight: 0,
fillColor: "#ffffff",
fillOpacity: 0.35,
map: this.map,
center: latlng,
radius: this.fenceData[i].radius,
};
var removeCircle = new google.maps.Circle(circleDetails);
removeCircle.setMap(null);