[OpenLayers-Users] Openlayers with mapserv

Tim Schaub tschaub at openplans.org
Tue Aug 21 14:16:16 EDT 2007


Hey-

One more tiny comment below...

Eric Lemoine wrote:
> Hi,
> 
> One comment below.
> 
>>        var wmsmdi = new OpenLayers.Layer.WMS( "MDI", wmsurl,
>>                     {layers: "DEM30,ponds,streams,roads",
>> transparent:"true",format: "image/png"},
>>                     {tileSize: new OpenLayers.Size(400, 400), buffer: 1 },
>>                     {'isBaseLayer':true} );
> 
> I know this has nothing to do w/ your problem, but you might want to know this:
> 
> isBaseLayer should be specified in the fourth argument, along with
> tileSize and buffer. Also, transparent:true and isBaseLayer:true are
> contradictory - transparent layers are always overlays.

It is fine to set the isBaseLayer option to true and to have the 
transparent parameter set to "true" - assuming you want to request an 
image with transparency and have it as the base layer.  If you specify 
transparent: "true" in your parameters and *don't* specify isBaseLayer: 
true in your options, then the layer.isBaseLayer property will be set to 
false.  Otherwise, the options you specify will be respected.

That said, Eric's comment about four arguments is right on.  The 
MapServer layer constructor takes only four arguments - so the fifth one 
shown above is ignored.

Tim


> 
> Cheers,
> 
> --
> Eric
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
> 
> !DSPAM:4033,46ca6c9429751804284693!
> 




More information about the Users mailing list