-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathleaflet-blank.html
61 lines (56 loc) · 1.61 KB
/
leaflet-blank.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
<!DOCTYPE html>
<html>
<head>
<title>Leaflet Map Intro</title>
<meta charset="utf-8" />
<!--setting viewport is important for proper mobile scaling-->
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- Leaflet -->
<link rel="stylesheet" href="_leaflet/plugins/leaflet/leaflet.css" />
<script src="_leaflet/plugins/leaflet/leaflet.js"></script>
<script src="https://api.mapbox.com/mapbox.js/plugins/leaflet-hash/v0.2.1/leaflet-hash.js"></script>
<!-- Omnivore -->
<script src="_leaflet/plugins/omnivore/leaflet-omnivore.min.js"></script>
<!-- Search -->
<link rel="stylesheet" href="_leaflet/plugins/search/leaflet-search.min.css" />
<script src="_leaflet/plugins/search/leaflet-search.min.js"></script>
<!--Choropleth -->
<script src="_leaflet/plugins/choropleth/choropleth.js"></script>
<!--Turf -->
<script src="_leaflet/plugins/turf/turf.min.js"></script>
<style>
body,
html {
height: 100%;
width: 100%;
margin: 0;
}
#map {
width: 100%;
height: 100%;
background: whitesmoke;
}
#coord {
position: absolute;
bottom: 0;
left: 0;
background: white;
color: #0078A8;
font-size: 11px;
}
</style>
</head>
<body>
<div id="map">
<div id="coord"></div>
</div>
<script>
var map = new L.map('map');
map.setView([39, -82], 10);
var coord = document.getElementById("coord");
map.on('mousemove', function(e) {
coord.innerHTML = e.latlng.lat + ', ' + e.latlng.lng;
});
</script>
</body>
</html>