<span class="q" id="q_1123222fef21422b_1">Hello,<br>I'm a new user to OpenLayers I'm running 2.3 and are getting WMS data from GeoServer 1.5.0. What I was trying to do was have a shape file as my base map and various tiff image overlays (all requested as PNG). Both the base map and a single overlay layer are displayed however the overlay image has a massive white area outside of the image extent.
<br><br>I have tried specifying transparent: true but no luck, I can reduce the white area by setting maxExtent: new OpenLayers.Bounds(...) but can only get that to work when using lat & lon values (which dont seem to be accurate to the amount they reduce the white area.
<br><br>my code is similar to the following :-<br>map = new OpenLayers.Map( $('map'), { controls: [] });<br>var basemap = new OpenLayers.Layer.WMS("NZ Coast",<br>"<a href="http://localhost:8080/geoserver/wms?service=wms">
http://localhost:8080/geoserver/wms?service=wms</a>",<br> {layers: 'bimaris:nzcoast', bgcolor: '#96B4CC', format: 'image/png'},<br> {maxExtent: new OpenLayers.Bounds(166.25916889102302,-47.4098674940290
,179.48459790941232,-34.001147239984334)}<br>);<br>var overlay = new OpenLayers.Layer.WMS("Sat Img",<br>"<a href="http://localhost:8080/geoserver/wms?service=wms">http://localhost:8080/geoserver/wms?service=wms
</a>",<br>{layers: 'topp:be37a', format: 'image/png', transparent: true},<br>{isBaseLayer: false, maxExtent: new OpenLayers.Bounds(176,-38,175,-37.86), opacity: 0.5}<br>);<br><br>Any suggestions or help appreciated.
<br></span>