-
Notifications
You must be signed in to change notification settings - Fork 1
/
geoimagemap.html
89 lines (71 loc) · 2.18 KB
/
geoimagemap.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
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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml">
<HEAD>
<meta http-equiv="content-type" content="text/html; charset=latin9"/>
<TITLE>Openstreetmap.de TMS Slippymap</TITLE>
<style type="text/css">
html,body {
background-color: #ffffff;
height: 100%;
width: 100%;
margin: 0; padding: 0;
font-family: Helvetica,Arial,sans-serif;
overflow: hidden;
color: #000000;
}
div#map {
height: 100%;
width: 100%;
background-color:white;
}
div#permalink {
position:absolute;
top: 25px;
left: 80px;
height: 30px;
width: 400px;
z-index:4;
}
</style>
<script type="text/javascript" src="http://openlayers.org/api/OpenLayers.js"></script>
<script type="text/javascript">
//<![CDATA[
var map;
var layer_mapnik;
var layer_tah;
//var queryData = parseQueryString();
function drawmap() {
OpenLayers.Lang.setCode('de');
var proj4326 = new OpenLayers.Projection("EPSG:4326");
var projmerc = new OpenLayers.Projection("EPSG:900913");
map = new OpenLayers.Map('map', {
projection: new OpenLayers.Projection("EPSG:900913"),
displayProjection: new OpenLayers.Projection("EPSG:4326"),
controls: [
new OpenLayers.Control.MouseDefaults(),
new OpenLayers.Control.PanZoomBar(),
new OpenLayers.Control.Permalink(),
new OpenLayers.Control.Attribution()],
maxExtent: new OpenLayers.Bounds(-20037508.34,-20037508.34,20037508.34,20037508.34),
numZoomLevels: 19,
maxResolution: 156543,
units: 'meters'
});
var layer_wms = new OpenLayers.Layer.XYZ( 'WMS',
'http://geoimage.openstreetmap.at/4d80de696cd562a63ce463a58a61488d/${z}/${x}/${y}.jpg',{numZoomLevels:19});
map.addLayers([layer_wms]);
// zoom to WMS extend
wmsextend = new OpenLayers.Bounds(9.35676,46.0872,17.3099,49.2092);
wmsextend.transform(proj4326, projmerc)
if (!map.getCenter()) {
map.zoomToExtent(wmsextend);
}
};
//]]>
</script>
</head>
<body onload=drawmap();>
<div id="map"></div>
</BODY>
</HTML>