qgis / qgis-js

QGIS core ported to WebAssembly to run it on the web platform

Home Page:https://qgis.github.io/qgis-js

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Expose QgsLayerTree in the API

boardend opened this issue · comments

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!)