qgis-js
qgis-js copied to clipboard
Expose QgsLayerTree in the API
The current MapLayer implementation cannot deal with hierarchical layers (e.g. layer groups).
Instead of doing our own abstraction, we should expose the QGIS internals: QgsLayerTree, QgsLayerTreeModel, QgsLayerTreeNode, QgsLayerTreeGroup, QgsLayerTreeLayer.
Based on this API, one should be able to build a hierarchical layer tree widget.
+1 ... exposing layer tree will be useful.
One note: QgsLayerTreeModel is most likely not needed here - it is mainly used for Qt model/view stuff.
(And it would be very useful to also have a GUI widget which could be used to control the layer tree!)