[OpenLayers-Dev] Merging Layers

Paul Spencer pspencer at dmsolutions.ca
Sun Jul 8 22:09:52 EDT 2007


Hi Bradley, I believe that you need to make your mapserver WMS layers  
be not base layers, and make them transparent, here is an example:

layer = new OpenLayers.Layer.WMS( "OpenLayers WMS",
         "http://labs.metacarta.com/wms/vmap0", {layers: 'basic',  
'transparent':true},
         {isBaseLayer: false} );

This is because OL only allows one 'base layer' to be on at a time,  
and WMS layers are considered to be base layers by default.

Cheers

Paul

On 8-Jul-07, at 9:48 PM, Bradley Mclain wrote:

> This seems really basic but at the moment I can't work out how to  
> merge layers using OpenLayers. All I get is my layers all showing  
> up as base layers and only being able to turn on one at a time.
>
> I want to be able to have a Google maps layer as my base and then  
> overlay it with custom WMS/Mapserver layers.
> _______________________________________________
> Dev mailing list
> Dev at openlayers.org
> http://openlayers.org/mailman/listinfo/dev

+-----------------------------------------------------------------+
|Paul Spencer                          pspencer at dmsolutions.ca    |
+-----------------------------------------------------------------+
|Chief Technology Officer                                         |
|DM Solutions Group Inc                http://www.dmsolutions.ca/ |
+-----------------------------------------------------------------+








More information about the Dev mailing list