Home > Enterprise >  Openlayers loading tiles mapserver map problem shows the result is not correct
Openlayers loading tiles mapserver map problem shows the result is not correct

Time:09-19

 

<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>
Var map, layer;

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>





Results show that the really wonderful work shows every tile are maps of the whole figure and an area is not display content
Who know how to return a responsibility?

CodePudding user response:

Service release has a problem, map services have analytical parameters BBOX behind a series of parameters, such as, if not is the whole map of each request returns

CodePudding user response:

reference 1st floor jelly870115 response:
published map service has a problem, map service have analytical parameters BBOX behind a series of parameters, such as, if not is the whole map of each request returns
how to know the real problem is that the tested the new contact found in this set BBOX is certainly no resolution but don't know what should openlayers this off?

CodePudding user response:

Remove the mode=map
  • Related