<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>MapServer Layer</title>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
<link rel="stylesheet" href="style.css" type="text/css" />
<script src="../lib/OpenLayers.js"></script>
<script type="text/javascript">
var map, urban,lakes,states,roads,vectors;
function init(){
map = new OpenLayers.Map('map',{maxResolution: 'auto'});
map.addControl(new OpenLayers.Control.LayerSwitcher({'ascending':true}));
map.addControl(new OpenLayers.Control.ScaleLine());
map.addControl(new OpenLayers.Control.Scale());
map.addControl(new OpenLayers.Control.MousePosition());
map.addControl(new OpenLayers.Control.OverviewMap());
map.addControl(new OpenLayers.Control.KeyboardDefaults());
vectors = new OpenLayers.Layer.Vector( "Vector Layer",{isBaseLayer: false,visibility:false});
urban = new OpenLayers.Layer.MapServer( "Urban Areas",
"http://localhost/cgi-bin/mapserv.exe?",
{map: 'C:/mapdata/third.map',
layers:'urbanareas',
transparent: 'true'},
{isBaseLayer:false,
visibility:false,
singleTile: true});
lakes = new OpenLayers.Layer.MapServer( "Lakes",
"http://localhost/cgi-bin/mapserv.exe?",
{map: 'C:/mapdata/third.map',
layers:'lakes',
transparent: 'true'},
{isBaseLayer:false,
visibility:false,
singleTile: true});
states = new OpenLayers.Layer.MapServer( "States",
"http://localhost/cgi-bin/mapserv.exe?",
{map: 'C:/mapdata/third.map',
layers:'states'},
{isBaseLayer:true,
singleTile: true});
roads = new OpenLayers.Layer.MapServer( "Roads",
"http://localhost/cgi-bin/mapserv.exe?",
{map: 'C:/mapdata/third.map',
layers:'roads',
transparent: 'true'},
{isBaseLayer:false,
visibility:false,
singleTile: true});
map.addLayers([urban, lakes, states,roads,vectors]);
var panel = new OpenLayers.Control.EditingToolbar(vectors);
map.addControl(panel);
var click = new OpenLayers.Control.Click();
map.addControl(click);
click.activate();
var panel = new OpenLayers.Control.EditingToolbar(vectors);
map.addControl(panel);
}
</script>
</head>
<body onload="init()">
<div id="map" class="smallmap"></div>
</div>
</body>
</html>