-
Notifications
You must be signed in to change notification settings - Fork 0
/
new_example.html
76 lines (66 loc) · 2.21 KB
/
new_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
<!DOCTYPE html>
<html lang="en">
<head>
<title>Layers Control Tutorial - Leaflet</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link
rel="shortcut icon"
type="image/x-icon"
href="docs/images/favicon.ico"
/>
<link
rel="stylesheet"
href="https://unpkg.com/[email protected]/dist/leaflet.css"
integrity="sha512-xwE/Az9zrjBIphAcBb3F6JVqxf46+CDLwfLMHloNu6KEQCAWi6HcDUbeOfBIptF7tcCzusKFjFw2yuvEpDL9wQ=="
crossorigin=""
/>
<script
src="https://unpkg.com/[email protected]/dist/leaflet.js"
integrity="sha512-gZwIG9x3wUXg2hdXF6+rVkLF/0Vi9U8D2Ntg4Ga5I5BZpVkVxlJWbSQtXPSiUTtC0TjtGOmxa1AJPuV0CPthew=="
crossorigin=""
></script>
<style>
html,
body {
height: 100%;
margin: 0;
}
#map {
width: 100%;
height: 100vh;
background: linear-gradient(to right, #0f2027, #203a43, #2c5364);
}
</style>
</head>
<body>
<div id="map"></div>
<script>
var neurons_A = L.layerGroup();
var neurons_B = L.layerGroup();
L.marker([39.61, -105.02])
.bindPopup('This is Littleton, CO.')
.addTo(neurons_A);
L.marker([39.74, -104.99])
.bindPopup('This is Denver, CO.')
.addTo(neurons_A);
L.marker([39.61, -105.1])
.bindPopup('This is Littlet, CO.')
.addTo(neurons_B);
L.marker([39.71, -104.95])
.bindPopup('This is Goen, CO.')
.addTo(neurons_B);
var map = L.map('map', {
center: [39.73, -104.99],
zoom: 10,
layers: [neurons_A, neurons_B],
});
var baseLayers = {};
var overlays = {
Grupo_A: neurons_A,
Grupo_B: neurons_B,
};
L.control.layers(baseLayers, overlays).addTo(map);
</script>
</body>
</html>