事实证明,使用虚拟标记很容易!
function addCircle() {
center: new google.maps.LatLng(mapMarkers[currentMarker])
postion: new google.maps.LatLng(mapMarkers[currentMarker])
myPosition = mapMarkers[currentMarker].getPosition();
map.panTo(myPosition);
map.setZoom(9);
circle = new google.maps.Circle({
map: map,
editable: true,
fillColor: '#ffffff',
fillOpacity: 0.3,
strokeColor: '#ff0000',
strokeOpacity: 1.0,
strokeWeight: 1.5,
radius: 80467.2 // 50 MILES in meters
});
var dummyMarker = new google.maps.Marker({
position: myPosition,
visible: false,
map: map,
});
circle.bindTo('center', dummyMarker, 'position');
}