-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
69 lines (60 loc) · 2.5 KB
/
index.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
<!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.0, maximum-scale=1.0, user-scalable=0">
<meta name="apple-mobile-web-app-capable" content="yes">
<title>OpenLayers Basic Single WMS Example</title>
<link rel="stylesheet" href="http://openlayers.org/dev/theme/default/style.css" type="text/css">
<link rel="stylesheet" href="http://openlayers.org/dev/examples/style.css" type="text/css">
<script src="http://maps.google.com/maps/api/js?v=3.3&sensor=false"></script>
<script src="OpenLayers-2.11/OpenLayers.js"></script>
<script type="text/javascript">
var map, layer;
function init(){
map = new OpenLayers.Map('map', {
projection: new OpenLayers.Projection("EPSG:900913"),
units: "m",
maxResolution: 156543.0339,
maxExtent: new OpenLayers.Bounds(
-20037508, -20037508, 20037508, 20037508.34
),
controls: [
new OpenLayers.Control.Navigation(),
new OpenLayers.Control.PanZoomBar(),
new OpenLayers.Control.LayerSwitcher({'ascending':false}),
new OpenLayers.Control.Permalink(),
new OpenLayers.Control.Permalink('permalink'),
],
numZoomLevels: 18
});
var osm = new OpenLayers.Layer.OSM();
var gmap = new OpenLayers.Layer.Google("Google Streets");
map.addLayers([osm, gmap]);
layer2 = new OpenLayers.Layer.WMS( "Water",
"http://maps.u-map.it/wms",
{
layers: 'Devtrac:WaterSources',
transparent: true
} );
layer2.setIsBaseLayer(false);
map.addLayer(layer2);
map.addControl(new OpenLayers.Control.LayerSwitcher());
map.setCenter(OpenLayers.LonLat(3626478.9153,33020.60232), 11);
// map.zoomTo(11);
}
</script>
</head>
<body onload="init()">
<h1 id="title">Basic Single WMS Example</h1>
<div id="tags">
basic, simple, minimal, cleanup
</div>
<div id="shortdesc">Show a Simple Map</div>
<div id="map" class="smallmap"></div>
<div id="docs">
<p>This example shows a very simple layout with minimal controls.
This example uses a single WMS base layer.</p>
</div>
</body>
</html>