This repository has been archived by the owner on Jan 18, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
geomap.html
63 lines (54 loc) · 2.04 KB
/
geomap.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
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0" />
<title>Freifunk KBU - Knotenkarte</title>
<link rel="stylesheet" type="text/css" href="css/leaflet.css" />
<link rel="stylesheet" type="text/css" href="css/style.css" />
<link rel="stylesheet" type="text/css" href="css/geomap.css" />
<style type="text/css">
#map {
width: 100%;
box-sizing:border-box;
}
.olPopup p { margin:0px; }
.nodePopup { font-size: 0.8em; }
.nodePopup .label { font-weight: bold; }
</style>
<script type="text/javascript" src="lib/vendor/d3.min.js"></script>
<script type="text/javascript" src="lib/vendor/leaflet.js"></script>
<script type="text/javascript" src="geomap_compiled.js"></script>
<script type="text/javascript">
window.onresize = resize
function getOffset( el ) {
var _x = 0, _y = 0
while( el && !isNaN( el.offsetLeft ) && !isNaN( el.offsetTop ) ) {
_x += el.offsetLeft - el.scrollLeft
_y += el.offsetTop - el.scrollTop
el = el.offsetParent
}
return { top: _y, left: _x }
}
function resize() {
var offset = getOffset(document.getElementById('map'))
var w = window.innerWidth - offset.left
var h = window.innerHeight - offset.top - 1
d3.select("#map").style("width", w+"px").style("height", h+"px")
}
</script>
</head>
<body onload="resize(); init()">
<header>
<h1><a href="//kbu.freifunk.net/" id="sitelink">kbu.freifunk.net</a></h1>
<ul>
<li><a href="graph.html">Graph</a></li>
<li><a href="geomap.html">Karte</a></li>
<li><a href="list.html">Liste</a></li>
<li><a href="//kbu.freifunk.net/nodegame">Nodegame</a></li>
</ul>
<button id="gpsbutton">Koordinaten beim nächsten Klick anzeigen</button>
</header>
<div id="map"></div>
</body>
</html>