mohsen-angular-leaflet-directive
Version:
angular-leaflet-directive - An AngularJS directive to easily interact with Leaflet maps
47 lines (45 loc) • 1.87 kB
HTML
<html ng-app="demoapp">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script src="../bower_components/angular/angular.min.js"></script>
<script src="../bower_components/leaflet/dist/leaflet.js"></script>
<script src="../bower_components/esri-leaflet/dist/esri-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("LayersEsriTiledMapLayerController", [ "$scope", function($scope) {
angular.extend($scope, {
center: {
lat: 30.70,
lng: -81.47,
zoom: 9
},
layers: {
baselayers: {
historic: {
name: "Historic Topographic Maps",
type: "agsTiled",
url: "http://services.arcgisonline.com/ArcGIS/rest/services/USA_Topo_Maps/MapServer",
visible: false
},
navigation: {
name: "World Navigation Charts",
type: "agsTiled",
url: "http://services.arcgisonline.com/ArcGIS/rest/services/Specialty/World_Navigation_Charts/MapServer",
visible: false
}
}
},
});
}]);
</script>
</head>
<body ng-controller="LayersEsriTiledMapLayerController">
<leaflet lf-center="center" lf-layers="layers" width="100%" height="480px"></leaflet>
<h1>Esri ArcGIS Tiled Map Layer</h1>
<p>Use the Layer Switch Control on the top rigth of the map to show another Esri Tiled Map Layers.</p>
</body>
</html>