Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add layer to group #101

Open
cratcliff opened this issue Aug 11, 2021 · 1 comment
Open

Add layer to group #101

cratcliff opened this issue Aug 11, 2021 · 1 comment

Comments

@cratcliff
Copy link

Is it possible to either specify a group layer name or return the QGIS layer when using Map.addLayer() so I can add it to a group layer? I would like to do this for both vector and raster layers.

Thanks

@gena
Copy link
Collaborator

gena commented Aug 11, 2021

This is not possible in the current version but sounds like a nice feature to have, for example, by providing the layer name as a "GorupLayerName/LayerName" - add to the roadmap.

As a workaround, you can use QGIS API to move the newly added layer to a group layer, something like https://gis.stackexchange.com/questions/329547/qgis-3-move-layer-to-group. This may require some checks to make sure the layer doesn't exist.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants