[Users] Loading WMS layer from WMSCapabilities Store

Hugo hfpmartins at gmail.com
Mon Jun 6 14:38:25 CEST 2011


Hello all,

I'm having some troubles to add WMS layers from a WMSCapabilities store. The
problem is not related with loading the layer itself. The problem i'm facing
can be divided into two:

1. When loading the WMS layer there are some parameters that are not being
set
2. The layer appears in all the folders and sub-folders of the Tree panel
(baselayers and theme layers)

About problem one, the layer is loaded but is not transparent as specified
in my code. About the second problem, i really don't understand why is this
happening once i have configured a sepcific layernode to add to the tree
panel.

The code i'm using is the following:

for (i=0; i<selLayers.length; i++){
    var layerClone = selLayers[i].get('layer');
    layerClone.mergeNewParams({
        srs: baseMercator,
        format: 'image/png',
        transparent: true
    },{
        isBaseLayer: false,
        singleTile: true,
        visibility: false
    });

    map.addLayer(layerClone);

    var addWmsNode = new GeoExt.tree.LayerNode({
        layer: layerClone,
        text: layerClone.name,
        iconCls: 'wms',
        leaf: true,
        checked: false,
        radioGroup: 'tematico',
        uiProvider: treeUI
    });

    userRoot.appendChild(addWmsNode);
}

What am i missing or doing wrong here?
Kind regards,

Hugo

-- 
Hugo Martins
LabNT - ISEGI UNL
Campus de Campolide
1070-312 Lisboa
N 38°43'56.84", W 9°9'35.74"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.geoext.org/pipermail/users/attachments/20110606/7cb6b789/attachment.htm 


More information about the Users mailing list