forked from makinacorpus/Leaflet.MeasureControl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
72 lines (65 loc) · 2.01 KB
/
index.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
<!DOCTYPE html>
<html>
<head>
<title>Leaflet.MeasureControl</title>
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.7/leaflet.css" />
<link rel="stylesheet" href="Leaflet.draw/dist/leaflet.draw.css" />
<link rel="stylesheet" href="leaflet.measurecontrol.css" />
<script src="http://cdn.leafletjs.com/leaflet-0.7/leaflet.js"></script>
<script src="Leaflet.draw/dist/leaflet.draw.js"></script>
<script src="leaflet.measurecontrol.js"></script>
<style>
#map {
position: absolute;
top:0;
left: 0;
right: 0;
bottom:0;
}
.leaflet-control.enabled a {
background-color: yellow;
}
.help {
font-size: 1.5em;
position: absolute;
top:0;
left: 0;
right: 0;
height: 30px;
z-index: 10;
background-color: rgba(0,0,0,0.5);
color: white;
padding: 10px;
margin: 0px;
text-align: center;
}
.help a.sources {
float: left;
margin-left: 50px;
color: white;
}
.help a.logo {
float: right;
}
.help a.logo img {
height: 30px;
}
</style>
</head>
<body>
<p class="help">A control to mesure distances
<a class="sources" href="http://github.com/makinacorpus/Leaflet.MeasureControl/">Sources</a>
<a class="logo" href="http://makina-corpus.com"><img src="http://depot.makina-corpus.org/public/logo.gif"/></a>
</p>
<div id="map"></div>
<script type="text/javascript">
var osm = L.tileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
attribution: 'Map data © 2013 OpenStreetMap contributors',
});
var map = L.map('map')
.setView([48.49, 1.4], 16)
.addLayer(osm);
L.Control.measureControl().addTo(map);
</script>
</body>
</html>