[OpenLayers-Users] couple of hopefully quick OpenLayers questions

Cicconetti, Bob BCicconetti at dnr.state.md.us
Fri Apr 13 15:00:38 EDT 2007


1. I'd just set maxExtent on your Map object.

2. Are you using IE, and if so, are your overlays in png? IE has trouble 
with PNG transparency, so you have to stick to gif. You also have to tag the
layer with transparent: true.

layer = new OpenLayers.Layer.WMS( "Property Maps",
              url,
              {layers: 'PropertyMaps', format: "image/gif", transparent: true },
              {isBaseLayer: false, visibility: false});
map.addLayer(layer);

Note that the format and transparent options have to be in the parameter array,
while the isBaseLayer and visibility tags are in the options array. I think the
baselayer option is redundant if you enable layer transparency.

R C

-----Original Message-----
From: users-bounces at openlayers.org [mailto:users-bounces at openlayers.org] On Behalf Of Ed Fialkowski
Sent: Friday, April 13, 2007 2:47 PM
To: users at openlayers.org
Subject: [OpenLayers-Users] couple of hopefully quick OpenLayers questions

Hi all, we just started using OpenLayers as an alternative to googlemaps for a web application we are making.  This application is used for comparing two sets of gridded data and displaying the result visually.

So, my questions: 
1. Is there a way to set the Bbox for a WMS.Untiled layer?  As far as I can tell the entire world is always queried.  Some of our sets use only North American data and loading the entire world takes too long.  If this takes writing my own WMS.custom layer, that's fine, but even looking at the custom WMS classes I just can't find where the max Bbox is set.

2. Adding an overlay:  Is it possible to set the overlay transparent?  In my WMS request url,  if I had the transparent=true flag, most of the image comes back black but it is still not transparent at all.  The black totally covers up the baseLayer. 





More information about the Users mailing list