forked from Alain1405/leafletjs-kit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
measurecontrol-demo.html
30 lines (30 loc) · 1.1 KB
/
measurecontrol-demo.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
<!DOCTYPE html>
<html>
<head>
<title>Leaflet.MeasureControl</title>
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.6.4/leaflet.css" />
<link rel="stylesheet" href="css/leaflet.draw.css" />
<link rel="stylesheet" href="css/leaflet.measurecontrol.css" />
<script src="http://cdn.leafletjs.com/leaflet-0.6.4/leaflet.js"></script>
<script src="js/leaflet.draw.js"></script>
<script src="js/leaflet.measurecontrol.js"></script>
<style>
#map{position: absolute; top:0; left: 0; right: 0; bottom:0}
.leaflet-control.enabled a{background-color: yellow}
</style>
</head>
<body>
<h1>Leaflet.MeasureControl Demo</h1>
<div id="map"></div>
<script>
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>
<p><cite><a href="http://makinacorpus.github.io/Leaflet.MeasureControl/">Leaflet.MeasureControl</a></cite></p>
</body>
</html>