<style type="text/CSS" & gt;
# map {
width: 100%;
Height: 99%;
border: 1px solid black;
}
Body {
padding:0px;
Margin: 2 p
}
# LABS {
position:absolute;
Bottom: 15 px;
Left: 7 px;
The font - size: the smaller;
Z - index: 5000;
}
</style>
<script SRC="http://openlayers.org/api/OpenLayers.js" & gt; </script>
The function the init () {
Var map=new OpenLayers map (
{
Div: "map",
//the following are very important, if not set, every image in accordance with BBOX: - 180, 270-90, living - the longitude and latitude to find, to use meters for mapfile is can't find figure, white
MaxExtent: new OpenLayers. Bounds (109.0, 36.9, 109.9, 39.5),
MaxResolution: "auto",
Units: 'METERS',
The projection: "EPSG: 4326
}
);
Var layer=new OpenLayers. Layer. WMS (
"OpenPlayer WMS,"
"Http://192.168.0.39/cgi-bin/mapserv? MODE=MAP ",
{the layers: 'ALL', the map: './data/yulin, yulin map, IMAGETYPE: 'the PNG}
);
Map. AddLayer (layer);
Map. SetCenter (new OpenLayers. LonLat (0, 0), 15);
Map. AddControl (new OpenLayers. Control. LayerSwitcher ());
}
</script>