forked from tombatossals/angular-leaflet-directive
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path0229-layers-esri-heatmap-layer-example.html
62 lines (62 loc) · 2.63 KB
/
0229-layers-esri-heatmap-layer-example.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
<!DOCTYPE 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/angular-simple-logger/dist/angular-simple-logger.js"></script>
<script src="../bower_components/Leaflet.heat/dist/leaflet-heat.js"></script>
<script src="../bower_components/esri-leaflet/dist/esri-leaflet.js"></script>
<script src="../bower_components/esri-leaflet-heatmap-feature-layer/dist/esri-leaflet-heatmap-feature-layer.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("LayersEsriHeatmapLayerController", [ "$scope", function($scope) {
angular.extend($scope, {
center: {
lat: 40.706,
lng: -73.926,
zoom: 14
},
layers: {
baselayers: {
streets: {
name: "Gray",
type: "agsBase",
layer: "Gray",
visible: false
}
},
overlays: {
simple: {
name: "Simple",
type: "agsHeatmap",
url: "https://services.arcgis.com/rOo16HdIMeOBI4Mb/ArcGIS/rest/services/Graffiti_Reports/FeatureServer/0",
visible: true,
layerOptions: {
radius: 14,
gradient: {
0.2: "#ffffb2",
0.4: "#fd8d3c",
0.6: "#fd8d3c",
0.8: "#f03b20",
1: "#bd0026"
}
}
}
}
}
});
}]);
</script>
</head>
<body ng-controller="LayersEsriHeatmapLayerController">
<leaflet lf-center="center" layers="layers" width="100%" height="480px"></leaflet>
<h1>Esri ArcGIS Heatmap Layer</h1>
<p>
Displaying point data as a heatmap using the L.heat plugin with custom styling of heatmap gradients with the L.heat options.
</p>
</body>
</html>