This repository was archived by the owner on Nov 30, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
This repository was archived by the owner on Nov 30, 2018. It is now read-only.
Circle radius_changed event #1068
Copy link
Copy link
Closed
Description
Hi,
i am facing issues with radius_changed event. when ever i change radius on map radius_changed triggers twice.
<ui-gmap-google-map center='map.center'
zoom='map.zoom'
draggable='map.draggable'
dragging='map.dragging'
refresh='map.refresh'
options='map.options'
events='map.events'
pan='map.pan'
>
<ui-gmap-circle center='map.circle.center'
radius='map.circle.radius'
fill='map.circle.fill'
stroke='map.circle.stroke'
clickable='map.circle.clickable'
draggable='map.circle.draggable'
editable='map.circle.editable'
visible='map.circle.visible'
events='map.circle.events'
>
</ui-gmap-circle>
</ui-gmap-google-map>
(function (window, ng) {
ng.module('myApp', ['uiGmapgoogle-maps'])
.controller('MapsCtrl', ['$scope', "uiGmapLogger", "uiGmapGoogleMapApi",
function ($scope, $log, GoogleMapApi) {
var center= {
latitude: 26.153215225012733,
longitude: -81.80121597097774
};
$scope.map = {
center: center,
pan: true,
zoom: 16,
refresh: false,
events: {},
bounds: {}
};
$scope.map.circle = {
id: 1,
center: center,
radius: 500,
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
events:{
dblclick: function(){
window.alert("circle dblclick");
},
radius_changed: function(){
//window.alert("circle radius radius_changed");
console.log("circle radius radius_changed");
}
}
}
}]);
})(window, angular);