This widget is directly taken from the GeoExt.ux eXtensions. It’s a LayerTree widget that automatically creates its nodes every time a new OpenLayers.Layer object is added to the map.
Sample configuration.
<geoextux_layertreebuilder>
<name>W_MyLayerTreeBuilder</name>
<options>
<wmsLegendNodes>false</wmsLegendNodes>
</options>
</geoextux_layertreebuilder>
This widget must be drawn using the drawWidgets method : drawWidget / drawWidgets
There are no mandatory options for this widget.
Any Ext.tree.TreePanel property is a valid option for this widget.
wmsLegendNodes: | (Boolean) Defaults to ‘true’. Whether wms layer nodes should display a legend or not. |
---|---|
vectorLegendNodes: | |
(Boolean) Defaults to ‘true’. Whether vectro layer nodes should display a legend or not. |
Warning
Don’t use hashtable objects when creating your Ext objects in your template.xslt file. This widget doesn’t work with them. Directly instanciate the objects instead.
Don’t :
var oCenterPanel = { xtype: 'panel', ... };
Do :
var oCenterPanel = new Ext.Panel({ ... });
Warning
When using this widget with the Map widget, you must set ‘addLayers’ map option to ‘false’ and manually add them after the creation of the GeoExt.MapPanel widget and after the printWidgetExecution template call.
Here’s an example on how to do so :
<xsl:variable name="pstrMapName">
<xsl:value-of select="/geoprisma/widgets/widget[./type = 'map']/name"></xsl:value-of>
</xsl:variable>
<xsl:call-template name="map:addLayers" >
<xsl:with-param name="pMapName">
<xsl:value-of select="$pstrMapName"></xsl:value-of>
</xsl:with-param>
</xsl:call-template>
Note
Avoid using tilecache services without the ‘staticCache’ option set to true. Layers without this option are created as ‘WMS’, which make them send ‘GetLegendGraphic’ requests that never return anything when they become visible.
N/A
N/A