Hi List,<br><br>I'm using openlayers to send a
WMS query based on a user-chosen extent of a rectangular polygon. My
javascript is as follows:<br>
<br> // request raster layer<br> rasterLayer = new OpenLayers.Layer.WMS( <br> "Road layer..... ",<br> "<a href="http://mysite/mapserv.cgi?map=roads.map&">http://mysite/mapserv.cgi?map=roads.map&</a>", <br>
{ layers: 'roads', <br> transparent: true <br> },<br> { maxExtent: centralBounds, // extents of rectangular polygon drawn on-screen <br> displayOutsideMaxExtent: false, // this is false by default, but I tried adding it anyway<br>
tileSize:new OpenLayers.Size(80,80), // by default this is 256<br> opacity: 0.5, <br> gutter: 0} <br> );<br><br><div id=":18p">I am trying to return information from a raster using Mapserver.The query returns a WMS layer, but only three of the four sides of the polygon have the correct
extents, and the WMS layer is a square. I've tried to illustrated this
in the below diagram:<br>
<br>X = requested<br>_____________<br>| |<br>| XXXX |<br>| XXXX |<br>| |<br>---------------------<br><br>Y = returned<br>_____________<br>| YYYY |<br>
| YYYY |<br>| YYYY |<br>| |<br>----------------------<br><br>The extents are definitely correct, as I've used them for
querying non-WMS data that is displayed in-browser. When I make the tileSize smaller (e.g. tileSize:new OpenLayers.Size(10,10), it fills the box perfectly. Initially, I noticed that I was getting the following error message in Firebug: "NetworkError: 404 Not Found - <a href="http://mysite.com/js_libraries/img/blank.gif">http://mysite.com/js_libraries/img/blank.gif</a>". My openlayers javascript is stored in the 'js_libraries' folder. I added a folder 'img' with 'blank.gif', and my problem temporarily disappeared, before the next page reload.<br>
<br>I asked a very similar question on the Mapserver list yesterday, thinking it was a mapserver problem. I thought I had resolved it, but I have not, and I don't think it is related to Mapserver. I'd appreciate any suggestions - I'd prefer not to reduce tilesizes as it makes the raster very slow to load.<br>
<br>Thanks,<br>David</div>