mohsen-angular-leaflet-directive
Version:
angular-leaflet-directive - An AngularJS directive to easily interact with Leaflet maps
30 lines (29 loc) • 1.08 kB
HTML
<html ng-app="demoapp">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script src="../bower_components/angular/angular.min.js"></script>
<script src="../bower_components/leaflet/dist/leaflet.js"></script>
<script src="../dist/angular-leaflet-directive.min.js"></script>
<link rel="stylesheet" href="../bower_components/leaflet/dist/leaflet.css" />
<script>
var app = angular.module("demoapp", ["leaflet-directive"]);
app.controller("ControlsScaleController", [ "$scope", function($scope) {
angular.extend($scope, {
london: {
lat: 51.505,
lng: -0.09,
zoom: 4
},
controls: {
scale: true
}
});
}]);
</script>
</head>
<body ng-controller="ControlsScaleController">
<leaflet lf-center="london" controls="controls" width="100%" height="480px"></leaflet>
<h1>Scale control example</h1>
</body>
</html>