forked from cccmzwi/matekate
-
Notifications
You must be signed in to change notification settings - Fork 0
/
matekate.html.in
136 lines (113 loc) · 3.29 KB
/
matekate.html.in
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
<html xmlns="http://www.w3.org/1999/xhtml">
<!--
Copyright 2009, 2010
Jörg Feuerhake
Tanjeff Moos <tanjeff@cccmz.de>
(Chaos Computer Club Mainz e.V.)
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<!--
This file serves as infile for the machMateKate.rb script, which replaces
certain patterns and places the result in matekate.html.
-->
<head>
<style type="text/css">
#map {
width: 100%;
height: 100%;
border: 0px;
padding: 0px;
position:
absolute;
}
body {
border: 0px;
margin: 0px;
padding: 0px;
height: 100%;
}
h2 {
text-align: center;
font-size: 12px;
font-weight: 700;
}
p {
text-align: left;
font-size: 10px;
font-weight: 400;
}
</style>
<script src="http://www.openlayers.org/api/OpenLayers.js">
</script>
<script src="http://www.openstreetmap.org/openlayers/OpenStreetMap.js">
</script>
<script type="text/javascript">
<!--
var map;
function init() {
// Create new map
map = new OpenLayers.Map('map',
{
maxExtent: new
OpenLayers.Bounds(-20037508.34,-20037508.34,20037508.34,20037508.34),
numZoomLevels: 19,
maxResolution: 156543.0399,
units:'m',
projection: new OpenLayers.Projection("EPSG:900913"),
displayProjection: new OpenLayers.Projection("EPSG:4326")
});
// Add base layers to map
var layerMapnik = new OpenLayers.Layer.OSM.Mapnik("Mapnik");
map.addLayers([layerMapnik]);
// Add overlay for drink:club-mate=* tagged locations
var drink_club_mate = new OpenLayers.Layer.Text(
"<small>\
drink:club-mate=* \
(##count_drink_club_mate##) \
##date_drink_club_mate##\
</small>",
{
location:"./drink_club-mate.txt",
projection: map.displayProjection
});
map.addLayer(drink_club_mate);
// Add overlay for drink:afri-cola=* tagged locations
var drink_afri_cola = new OpenLayers.Layer.Text(
"<small>\
drink:afri-cola=* \
(##count_drink_afri_cola##) \
##date_drink_afri_cola##\
</small>",
{
location:"./drink_afri-cola.txt",
projection: map.displayProjection,
// invisible by default, can be enabled by user:
visibility: false
});
map.addLayer(drink_afri_cola);
// Configure controls
map.addControl(new OpenLayers.Control.LayerSwitcher());
map.removeControl(map.controls[1]);
map.addControl(new OpenLayers.Control.PanZoomBar());
// set default position and zoom level
var lonLat = new OpenLayers.LonLat(8.350,50.053).transform(
map.displayProjection, map.projection
);
map.setCenter (lonLat,5);
} // end of function init()
// -->
</script>
</head>
<body onload="init()">
<div id="map" style="margin:12px;"></div>
</body>
</html>