0

The example provided in http://api.geoext.org/1.0/examples/tree.html shows all overlayes are checked but how do I make these overlayes unchecked while page is loaded?

2 Answers 2

2

On

<input class="x-tree-node-cb" type="checkbox" checked="">

Off

<input class="x-tree-node-cb" type="checkbox">

Recommend you use Firefox and Firebug to view the source live when and can interactively select objects and change their state and see the source code change.

enter image description here

1

When you make a call to the (WMS) layer and specify the parameters & options, you can set the visibility to false -

    wmsLayer = new OpenLayers.Layer.WMS("wms", "http://os2k239.ordsvy.gov.uk/geoserver/wms?",
         {
                layers: "layer 1",
                format: 'image/png'
            },
            {singleTile: true, isBaseLayer: false, buffer: 0, **visibility: false**}
        );

I hope this helps.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.