1
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
2
|
<head>
|
3
|
<meta http-equiv="imagetoolbar" content="no"> <!--ie image gizmo OFF!-->
|
4
|
<style type="text/css">
|
5
|
#map {
|
6
|
width: 512px;
|
7
|
height: 512px;
|
8
|
border: 1px solid black;
|
9
|
}
|
10
|
</style>
|
11
|
<script src="../lib/OpenLayers.js"></script>
|
12
|
<script type="text/javascript">
|
13
|
<!--
|
14
|
var map, layer, velayer;
|
15
|
|
16
|
function init(){
|
17
|
map = new OpenLayers.Map('map');
|
18
|
|
19
|
layer = new OpenLayers.Layer.WMS( "OpenLayers WMS",
|
20
|
"http://labs.metacarta.com/wms/vmap0", {layers: 'basic'} );
|
21
|
map.addLayer(layer);
|
22
|
|
23
|
|
24
|
yahooLayer = new OpenLayers.Layer.Yahoo( "Yahoo");
|
25
|
|
26
|
map.addLayer(yahooLayer);
|
27
|
|
28
|
map.setCenter(new OpenLayers.LonLat(-5, 40), 4);
|
29
|
map.addControl(new OpenLayers.Control.LayerSwitcher());
|
30
|
}
|
31
|
// -->
|
32
|
</script>
|
33
|
</head>
|
34
|
<body onload="init()">
|
35
|
<h1>OpenLayers Example</h1>
|
36
|
<div id="map"></div>
|
37
|
</body>
|
38
|
</html>
|