var sunCircle = {
strokeColor: "#c3fc49",
strokeOpacity: 0.8,
strokeWeight: 2,
fillColor: "#c3fc49",
fillOpacity: 0.35,
map: map,
center: userPosition,
radius: 1000, // in meters
editable:true
};
cityCircle = new google.maps.Circle(sunCircle);
cityCircle.bindTo('center', marker, 'position');
现在它的Editable是真的我们可以编辑圆圈,如果用户改变半径,我可以获得半径吗?
答案 0 :(得分:5)
google.maps.event.addListener(cityCircle, 'radius_changed', function () {
console.log(cityCircle.getRadius());
});
您可以找到有关编辑活动here
的更多信息