forked from tombatossals/angular-leaflet-directive
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path0510-markers-clustering-without-overlays-example.html
85 lines (78 loc) · 3.19 KB
/
0510-markers-clustering-without-overlays-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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
<!DOCTYPE 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="../bower_components/angular-simple-logger/dist/angular-simple-logger.js"></script>
<script src="../dist/angular-leaflet-directive.min.js"></script>
<script src="../bower_components/Leaflet.label/dist/leaflet.label.js"></script>
<script src="../bower_components/leaflet.markercluster/dist/leaflet.markercluster.js"></script>
<link rel="stylesheet" href="../bower_components/leaflet/dist/leaflet.css" />
<link rel="stylesheet" href="../bower_components/Leaflet.label/dist/leaflet.label.css" />
<link rel="stylesheet" href="../bower_components/leaflet.markercluster/dist/MarkerCluster.css" />
<link rel="stylesheet" href="../bower_components/leaflet.markercluster/dist/MarkerCluster.Default.css" />
<script>
var app = angular.module("demoapp", ["leaflet-directive"]);
app.controller('MarkersClusteringWithoutOverlaysController', [ '$scope', function($scope) {
angular.extend($scope, {
london: {
lat: 51.505,
lng: -0.09,
zoom: 8
},
markers: {
stoke: {
group: 'london',
lat: 51.5615,
lng: -0.0731,
label: {
message: "Stoke",
options: {
noHide: true
}
}
},
dalston: {
group: 'london',
lat: 51.545,
lng: -0.070,
label: {
message: "Dalston",
options: {
noHide: true
}
}
},
wandsworth: {
group: 'london',
lat: 51.4644,
lng:-0.1924,
label: {
message: "Wandsworth",
options: {
noHide: true
}
}
},
battersea: {
group: 'london',
lat: 51.4638,
lng: -0.1677,
label: {
message: "Battersea",
options: {
noHide: true
}
}
}
},
});
} ]);
</script>
</head>
<body ng-controller="MarkersClusteringWithoutOverlaysController">
<leaflet lf-center="london" markers="markers" height="480px" width="100%"></leaflet>
<h1>Marker clustering example without layers</h1>
</body>
</html>