mohsen-angular-leaflet-directive
Version:
angular-leaflet-directive - An AngularJS directive to easily interact with Leaflet maps
14 lines • 567 B
JavaScript
app.controller("BasicAccessLeafletObjectController", [ "$scope", "leafletLogger", "leafletData", function($scope, leafletLogger, leafletData) {
angular.extend($scope, {
london: {
lat: 51.505,
lng: -0.09,
zoom: 4
}
});
$scope.fitBounds = function() {
leafletData.getMap().then(function(map) {
map.fitBounds([ [40.712, -74.227], [40.774, -74.125] ]);
});
};
}]);