-
Notifications
You must be signed in to change notification settings - Fork 5
/
chlv95.html
47 lines (43 loc) · 1.68 KB
/
chlv95.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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd
">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<title>OpenStreetMap Schweiz</title>
<link rel="stylesheet" href="contrib/leaflet-0.7.2.css" type="text/css"/>
<!--[if lte IE 8]><link rel="stylesheet" href="contrib/leaflet-ie-0.7.2.css" type="text/css"/><![endif]
-->
<style type="text/css">
html, body, #map {
width: 100%;
height: 100%;
margin: 0;
}
</style>
<script src="contrib/jquery-1.9.1.min.js"></script>
<script src="contrib/leaflet-0.7.2.js"></script>
<script src="contrib/leaflet-hash.js"></script>
<script>
function onMouseMove(e)
{
footer = document.getElementById('map_footer_left');
chcoord = L.CRS.EPSG3857.project(e.latlng);
footer.innerHTML=chcoord.x.toFixed(0) + ", " + chcoord.y.toFixed(0);
}
$(document).ready(function() {
map = L.map('map').setView([10.5, 23.9], 9);
L.tileLayer('//tile.osm.ch/2056/{z}/{x}/{y}.png', {
maxZoom: 18,
attribution: '© <a href="//openstreetmap.org/copyright">OpenStreetMap</a> contributors. More <a href="//sosm.ch/swiss-lv95-projected-tiles/">information</a>'
}).addTo(map);
<!--hash = new L.Hash(map);-->
map.on('mousemove', onMouseMove);
});
</script>
</head>
<body>
<div id="map_footer_left" style="bottom:0; left:0; position:absolute; z-index:1000; font: 12px/1.5 Arial,Helvetica,sans-serif;">
</div>
<div id="map"></div>
</body>
</html>