MapFishLayerTree.js

Summary
MapFishLayerTree.js
Functions
toggleLayerNodeCalled when a layer that is member of the MapFish LayerTree has its visibility changed by an other mean than the layertree itself.
toggleSubLayerNodeCalled when a layer that is member of the MapFish LayerTree and also has sublayers has its ‘params’ changed other mean than the layertree itself.

Functions

toggleLayerNode

mapfish.widgets.LayerTree.prototype.toggleLayerNode = function()

Called when a layer that is member of the MapFish LayerTree has its visibility changed by an other mean than the layertree itself.  Used to toogle the checkbox accordingly to the visibility of the layer.

The event registration MUST use both ‘layer’ and ‘layerTree’ objects as scope parameters or else it won’t work.  Ex.: myLayer.events.on({ “visibilitychanged”: myMapFishLayerTree.toggleLayerNode, scope: {‘layer’: myLayer, ‘layerTree’: myMapFishLayerTree} });

Parameters

this.layerTree{<mapfish.widgets.LayerTree>}
this.layer{<OpenLayers.Layer>}

toggleSubLayerNode

mapfish.widgets.LayerTree.prototype.toggleSubLayerNode = function(e)

Called when a layer that is member of the MapFish LayerTree and also has sublayers has its ‘params’ changed other mean than the layertree itself.  Used to toogle the checkbox accordingly to the new ‘params’ of the layer.

Note : only WMS layers can have sublayers.

The event registration MUST use ‘layerTree’ objects as scope parameters or else it won’t work.  Ex.: myLayer.map.events.on({ “changelayer”: myMapFishLayerTree.toggleSubLayerNode, scope: {‘layerTree’: myMapFishLayerTree} });

Parameters

e{Object} Event
this.layerTree{<mapfish.widgets.LayerTree>}
mapfish.widgets.LayerTree.prototype.toggleLayerNode = function()
Called when a layer that is member of the MapFish LayerTree has its visibility changed by an other mean than the layertree itself.
mapfish.widgets.LayerTree.prototype.toggleSubLayerNode = function(e)
Called when a layer that is member of the MapFish LayerTree and also has sublayers has its ‘params’ changed other mean than the layertree itself.
Close