[OpenLayers-Users] TURN On layers Individually...

Christopher Schmidt crschmidt at metacarta.com
Wed Jul 1 15:12:30 EDT 2009


On Wed, Jul 01, 2009 at 04:08:50PM -0300, Paul james wrote:
> Hello guys...
> 
> I have that layer on Openlayers :
> 
>       var _layer = new OpenLayers.Layer.MapServer(
>        "PointLayer",
>        _cgi,
>        {
>            map: _mapfile,
>            singleTile: true,
>             layers: ['Layer1', 'Layer2', 'Layer3'],
>            transparent: "true",
>            format: "image/png"
>        },
>     );
> 
> If I use setVisibility on PointLayer, Layer1, 2 and 3 are turned ON...
> How Can I turn on/off Layer1,Layer2,Layer3 individually on javascript?

Create three different layers?

(You can probably also use mergeNewParams, but that's not OL
functioality for turning things 'on/off'.)

Regards,
-- 
Christopher Schmidt
MetaCarta



More information about the Users mailing list