<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>OpenLayers Example - MultiLayer</title>
<script type="text/javascript" src="../lib/OpenLayers.js"></script>
<script type="text/javascript" src="../lib/OpenLayers/Layer/MultiLayer.js"></script>
<script type="text/javascript">
var map;
var multiLayer;
var m1,m2;
var init = function() {
OpenLayers.ProxyHost = "/cgi-bin/hsproxy.cgi?url=";
map = new OpenLayers.Map("map");
var baselayer = new OpenLayers.Layer.WMS( "OpenLayers WMS",
"http://vmap0.tiles.osgeo.org/wms/vmap0", {layers: 'basic'} );
map.addLayer(baselayer);
map.setCenter(new OpenLayers.LonLat(15,50), 7);
map.addControl(new OpenLayers.Control.LayerSwitcher());
m1 = new OpenLayers.Layer.WMS("Forests",
"http://bnhelp.cz/ows/crtopo",
{layers:"les",transparent:true,format:"image/png"},
{isBaseLayer: false});
m2 = new OpenLayers.Layer.WMS("Trafic",
"http://bnhelp.cz/ows/crtopo",
{layers:"doprava",transparent:true,format:"image/png"},
{isBaseLayer: false});
m3 = new OpenLayers.Layer.WMS("Water",
"http://bnhelp.cz/ows/crtopo",
{layers:"voda",transparent:true,format:"image/png"},
{isBaseLayer: false});
m4 = new OpenLayers.Layer.WMS("Labels",
"http://bnhelp.cz/ows/crtopo",
{layers:"obce",transparent:true,format:"image/png"},
{isBaseLayer: false});
m5 = new OpenLayers.Layer.WMS("Cities",
"http://bnhelp.cz/ows/crtopo",
{layers:"sidla",transparent:true,format:"image/png"},
{isBaseLayer: false});
m6 = new OpenLayers.Layer.Vector("Layer KML",
{
strategies: [new OpenLayers.Strategy.Fixed()],
protocol: new OpenLayers.Protocol.HTTP({
url: "http://maps.google.com/maps/ms?authuser=0&vps=3&doflg=ptm&ie=UTF8&msa=0&output=kml&msid=206207751812008291193.0004a28ea699d9685d0b0",
format: new OpenLayers.Format.KML({
extractAttributes: true,
extractStyles: true
})
})
});
multiLayer = new OpenLayers.Layer.MultiLayer("Mutli",{
layers: [m5,m1,m2,m3,m4,m6]
});
map.addLayer(multiLayer);
};
</script>
</head>
<body onload="init()">
<h1>OpenLayers Layer.MultiLayer Example</h1>
<div id="map" style="width: 600px; height: 500px;"></div>
</body>
</html>