Hi,<br>I'm trying to add a simple KML layer in the treePanel but without success.<br>It works with the gx_overlaylayercontainer type but not with the gx_layer.<br><br>the KML :<br> var sundials = new OpenLayers.Layer.Vector("Sun", {<br>
projection: map.displayProjection,<br> strategies: [new OpenLayers.Strategy.Fixed()],<br> protocol: new OpenLayers.Protocol.HTTP({<br> url: "data/kml/sundials.kml",<br> format: new OpenLayers.Format.KML({<br>
extractStyles: true,<br> extractAttributes: true<br> })<br> })<br> });<br><br>the TreePanel :<br> var treeConfig = new OpenLayers.Format.JSON().write([{<br> nodeType: 'gx_baselayercontainer',<br>
text: 'Base layers',<br> expanded: true,<br> allowDrag: false,<br> allowDrop: false,<br> draggable: false,<br> icon: 'icon/imagimap/map.png'<br>
},{<br> nodeType: 'gx_overlaylayercontainer', /* ok, the kml displays */<br> text: 'All overlays',<br> expanded: true,<br> allowDrag: false,<br> allowDrop: false,<br>
draggable: false,<br> icon: 'icon/imagimap/map.png'<br> },{<br> text: 'Overlays',<br> icon: 'icon/imagimap/map_layer.png',<br> expanded: true,<br>
children: [{<br> nodeType: 'gx_layer', /* this GML works */<br> layer: 'moutains',<br> text: 'Montagnes d\'Europe',<br> qtip: "Montagnes d'Europe",<br>
icon: 'icon/imagimap/map.png'<br> },{<br> nodeType: 'gx_layer', /* this GML works */<br> text: 'Villes d\'Europe',<br> layer: 'city',<br>
qtip: "Villes d'Europe",<br> icon: 'icon/imagimap/map.png'<br> },{<br> nodeType: 'gx_layer', /* the kml doesn't display and I have this error : <span>this.node.layer.getVisibility is not a function */</span><br>
text: 'blop',<br> layer: 'sundials',<br> qtip: "blop",<br> icon: 'icon/imagimap/map.png'<br> }]<br> }], true<br>
);<br><br>I also get the same error when I decided to add a baseLayer by the nodeType gx_layer.<br><br>Do you know why I get this error message.<br><br>Best regards,<br><br>Fabien Goblet<br><a href="http://www.geotribu.net" target="_blank">http://www.geotribu.net</a><br>
<br><br><br>