如何从Google Maps V3中删除圈子? [英] How to remove circle from Google Maps V3?
本文介绍了如何从Google Maps V3中删除圈子?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我使用了
circle = new google.maps.Circle({
map:map,
radius:r,//以米为单位的1英里= 1609.3 m
strokeWeight:1,
strokeOpacity:0.5,
fillOpacity:0.2,
fillColor:'#AA0000 '
});
circle.bindTo('center',marker,'position');
如何从地图中删除圈子?
解决方案
circle.setMap(null);
会移除圈子
I have drawn circle using
circle = new google.maps.Circle({
map: map,
radius: r, // 1 miles in metres = 1609.3 m
strokeWeight:1,
strokeOpacity:0.5,
fillOpacity:0.2,
fillColor: '#AA0000'
});
circle.bindTo('center', marker, 'position');
How to remove circle from the map ?
解决方案
circle.setMap(null);
will remove the circle
这篇关于如何从Google Maps V3中删除圈子?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文