-
Notifications
You must be signed in to change notification settings - Fork 9
/
example.html
36 lines (28 loc) · 1.13 KB
/
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
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Leaflet MGRS Overlay Demo</title>
<link rel="stylesheet" href="bower_components/leaflet/dist/leaflet.css" />
<link rel="stylesheet" href="dist/leaflet.mousecoordinate.css" />
<style type="text/css">
html, body { width: 100%; height: 100%; margin: 0; }
#map { width: 100%; height: 100%; }
</style>
</head>
<body>
<div id="map"></div>
<script src="bower_components/leaflet/dist/leaflet.js"></script>
<script src="dist/leaflet.mousecoordinate.js"></script>
<script type="text/javascript">
map = new L.Map('map');
// create the tile layer with correct attribution
var osmUrl='http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png';
var osmAttrib='Map data © <a href="http://openstreetmap.org">OpenStreetMap</a> contributors';
var osm = new L.TileLayer(osmUrl, {minZoom: 1, maxZoom: 20, attribution: osmAttrib});
map.setView(new L.LatLng(59,5),6);
map.addLayer(osm);
L.control.mouseCoordinate({gpsLong: true, utm:true,utmref:true,gps: true}).addTo(map);
</script>
</body>
</html>