[OpenLayers-Users] Why is there a large white background area
beyond raster image overlays ?
bdw
bdwilton at gmail.com
Thu May 3 17:49:43 EDT 2007
I managed to sort this out, transparent: true did work in the end, must have
been a cache at some point along the line
bdw wrote:
>
> Hello,
> 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.
>
> 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.
>
> my code is similar to the following :-
> map = new OpenLayers.Map( $('map'), { controls: [] });
> var basemap = new OpenLayers.Layer.WMS("NZ Coast",
> "http://localhost:8080/geoserver/wms?service=wms",
> {layers: 'bimaris:nzcoast', bgcolor: '#96B4CC', format: 'image/png'},
> {maxExtent: new OpenLayers.Bounds(166.25916889102302,-47.4098674940290,
> 179.48459790941232,-34.001147239984334)}
> );
> var overlay = new OpenLayers.Layer.WMS("Sat Img",
> "http://localhost:8080/geoserver/wms?service=wms",
> {layers: 'topp:be37a', format: 'image/png', transparent: true},
> {isBaseLayer: false, maxExtent: new OpenLayers.Bounds(176,-38,175,-37.86),
> opacity: 0.5}
> );
>
> Any suggestions or help appreciated.
>
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
>
>
--
View this message in context: http://www.nabble.com/Why-is-there-a-large-white-background-area-beyond-raster-image-overlays---tf3657040.html#a10313787
Sent from the OpenLayers Users mailing list archive at Nabble.com.
More information about the Users
mailing list