forked from ffnord/ffmap-d3
-
Notifications
You must be signed in to change notification settings - Fork 0
/
geomap.html
62 lines (53 loc) · 2.01 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
<!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 Wuppertal - 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="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="http://freifunk-wuppertal.net">freifunk-wuppertal.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="http://firmware.freifunk-wuppertal.net/">Firmwarebäckerei</a></li>
</ul>
<h1><a href="https://freifunk-rheinland.net/">Freifunk Rheinland e. V.</a></h1>
<button id="gpsbutton">Koordinaten beim nächsten Klick anzeigen</button>
</header>
<div id="map"></div>
</body>
</html>