Hey, I was able to draw a circle perfectly with this code, but when I went to dynamically change the circle's center later on through code I was not able to unless I also changed the circles radius. Is this a bug or meant to be?
My code to initialize the circle:
<ui-gmap-circle center='circle.center'
radius='circle.radius'
fill='circle.fill'
stroke='circle.stroke'
clickable='circle.clickable'
draggable='circle.draggable'
editable='circle.editable'
visible='circle.visible'
events='circle.events'>
</ui-gmap-circle>
$scope.circle = {
id: 1,
center: {
latitude: centerLat,
longitude: centerlon
},
// radius in meters
radius: 50,
stroke: {
color: '#08B21F',
weight: 2,
opacity: 1
},
fill: {
color: '#08B21F',
opacity: 0.5
},
geodesic: true, // optional: defaults to false
draggable: true, // optional: defaults to false
clickable: true, // optional: defaults to true
editable: true, // optional: defaults to false
visible: true, // optional: defaults to true
control: {},
events: {
radius_changed: function(googleCircle, eventName, circle) {
},
center_changed: function(googleCircle, eventName, circle) {
}
}
};
What did not change the circles center location on the map:
$scope.circle['center'] = newCords;
What did work:
$scope.circle['center'] = newCords;
$scope.circle['radius'] = $scope.circle['radius'] + 1;