mohsen-angular-leaflet-directive
Version:
angular-leaflet-directive - An AngularJS directive to easily interact with Leaflet maps
24 lines • 902 B
JavaScript
app.controller("BasicDoubleMapAccessMapObjectController", [ "$scope", "leafletLogger", "leafletData", function($scope, leafletLogger, leafletData) {
angular.extend($scope, {
london: {
lat: 51.505,
lng: -0.09,
zoom: 4
},
markers: {
london: {
lat: 51.505,
lng: -0.09,
draggable: true
}
},
defaults: {
tileLayer: "http://{s}.tile.opencyclemap.org/cycle/{z}/{x}/{y}.png",
}
});
$scope.logLeafletData = function(name) {
leafletData.getMap(name).then(function(map) {
leafletLogger.info(map);
});
};
}]);