[Users] [TreeConfig][LayerNode.js] getVisibility is not a function
antoniofacno
antoniofcano at gmail.com
Thu Nov 11 17:10:54 CET 2010
Wooowww!!! That's amazing!! A lot of thanks, the layer tree is working!!!
On 11/11/10 12:33, Bart van den Eijnden (OSGIS) wrote:
> Let me clarify additonally, so if you use a string for layer, you need to
> use:
>
> layer: "Lindes"
>
> if you want to refer to the layer object, then use the variable name so
> without quotes:
>
> layer: lindes
>
> Best regards,
> Bart
>
>> Hi,
>>
>> layer should be pointing to the layer's name, so Lindes and Base and not
>> lindes and catastro.
>>
>> Best regards,
>> Bart
>>
>>> Hello,
>>>
>>> I'm still fighting with TreeMenu panel. This is my code written from the
>>> ground:
>>>
>>> var lindes = new OpenLayers.Layer.WMS(
>>> "Lindes",
>>> "http://getcloud.info:8080/geoserver/wms",
>>> {
>>> layers: "lindes",
>>> format: "image/png",
>>> transparent:true
>>> },
>>> {isBaseLayer: true, singleTile: true, visibility: true}
>>> );
>>>
>>> var catastro = new OpenLayers.Layer.WMS(
>>> "Base",
>>> "http://getcloud.info:8080/geoserver/wms",
>>> {
>>> layers: "ao:Catastro",
>>> format: "image/png",
>>> transparent:true
>>> },
>>> {isBaseLayer: true, singleTile: true, visibility: true}
>>> );
>>>
>>> var treeMenu = [
>>> {
>>> id:'1',
>>> text: 'Base',
>>> leaf: false,
>>> children: [
>>> {id:'11', nodeType: "gx_layer", layer:
>>> "lindes", leaf:true},
>>> {id:'12', nodeType: "gx_layer", layer:
>>> "catastro", leaf:true}
>>> ]
>>> }
>>> ]
>>>
>>> // create the tree with the configuration from above
>>> tree = new Ext.tree.TreePanel({
>>> border: true,
>>> region: "west",
>>> title: "Capas",
>>> width: 200,
>>> split: true,
>>> collapsible: true,
>>> expanded: true,
>>> root: {
>>> nodeType: "async",
>>> text: "AgroOffice",
>>> children: treeMenu
>>> }
>>> });
>>>
>>> I can open AgroOffice root, but when trying to open the Base Group the
>>> console error tells me:
>>>
>>> Error: this.node.layer.getVisibility is not a function
>>> Archivo de origen:
>>> http://ao.getcloud.info/GeoExt/lib/GeoExt/widgets/tree/LayerNode.js
>>> Línea: 30
>>>
>>> I'm really missed, what can I do?
>>>
>>> Best wishes,
>>>
>>> _______________________________________________
>>> Users mailing list
>>> Users at geoext.org
>>> http://www.geoext.org/cgi-bin/mailman/listinfo/users
>>>
>>
>> _______________________________________________
>> Users mailing list
>> Users at geoext.org
>> http://www.geoext.org/cgi-bin/mailman/listinfo/users
>>
>
>
More information about the Users
mailing list