.. _widget-mapfishlayertree-label: ======================== MapFishLayerTree ======================== .. note:: This widget is **deprecated**. Use the :ref:`widgets-geoextux-layertreebuilder-label` widget instead. Creates a MapFish LayerTree widget using the model defined in the options. XML Sample ------------ Sample configuration .. code-block:: xml W_MyMapFishLayerTree afghanistan i18n_all_layer ../../lib/externals/openlayers-trunk/img/zoom-world-mini.png undefined afghanistan i18n_overlay_layer ../../lib/externals/openlayers-trunk/img/zoom-world-mini.png undefined featureserver 123-ResourceParcel tomate false wms ResourceAFParcel afghanistan i18n_layer_parcel_af false Sample configuration with grouped resources that have the same wms service. When nodes with servicetype "wms" defined on the same level share the same OpenLayers.Layer.WMS object, they dynamically update the layer "param" property when is selected/deselected. .. code-block:: xml W_MyMapFishLayerTree TileCache undefined tilecache R_GMAP_PROV Province Boundaries true WMS true wms R_GMAP_PARK Parks false wms R_GMAP_FEDL Federal Limits true wms R_GMAP_RAIL Railroads false wms R_GMAP_ROAD Roads false wms R_GMAP_POPP Cities true Vector undefined featureserver R_GMAP_ROAD Roads true 1000005 500000 featureserver R_GMAP_POPP Cities true 1000005 500000 drawWidget Sample ------------------- The widget must be drawn with the *drawWidget* function. See :ref:`widget-basics-drawWidgets-label`. Can be drawn in a Ext.Panel or Ext.Window. Mandatory Options ------------------- :nodes: Defines the model for the ExtJS tree that will be built by the MapFish LayerTree widget. It can contains several tags. .. note:: The 'nodes' option used to be 'model' which still works but is **deprecated**. :nodes/node: Must be defined in a tag. **==== options ====** :checked: Define if a checkbox is to appear at this node, values are (**case sensitive**) : * true *(checkbox present, checked)* * false *(checkbox present, unchecked, this is the default value)* * undefined *(checkbox not present)*. :textkey: Text that will appear for this node in the layer tree. .. seealso:: :ref:`i18n-label`. **==== leaf options ====** The following options are valid only if the node is a leaf. :resourcename: name of the resource use in layername :layername: **Deprecated**, use **servicetype** instead. Name of the layer in the OpenLayers map object. See the layername option in the map widget. Either *layername* or *servicetype* must be set. :servicetype: The service type of the layer to have in this leaf. Either *layername* or *servicetype* must be set. Optional Options ------------------ **==== options ====** :expanded: Boolean. Default value is *true*. If this node as children, make it expanded by default or not. :nodes: A node can contain child nodes as well. These must be defined in the *nodes* option and will contain tags (see above). This will define this node as a branch in the layer tree and not a leaf. .. note:: The 'nodes' option of a 'node' tag use to be 'children' which still works but is **deprecated**. :icon: URL to this node icon. :maxScale: Float. Disables the node if the scale of the map gets bigger than this value :minScale: Float. Disables the node if the scale of the map gets smaller than this value Service Type -------------- N/A Widget Action -------------- read