[Qgis-user] Get layer-id by layer (not by acive layer)

Nathan Woodrow madmanwoo at gmail.com
Mon Oct 13 03:35:23 PDT 2014


Hey Walter.

Try this:

maplayers = QgsMapLayerRegistry.instance().mapLayers()

maplayers will be a dict of layerid-layer object

- Nathan

On Mon, Oct 13, 2014 at 7:19 PM, walter.nordmann <walter.nordmann at web.de>
wrote:

> Hi,
>
> running 2.4 /phyton programming
>
> i need the Id of one of three layers and that layer is not the active one.
>
> want to remove that unneeded layer with python.
>
> Regards
>
> walter
>
>
>
> --
> View this message in context:
> http://osgeo-org.1560.x6.nabble.com/Get-layer-id-by-layer-not-by-acive-layer-tp5167152.html
> Sent from the Quantum GIS - User mailing list archive at Nabble.com.
> _______________________________________________
> Qgis-user mailing list
> Qgis-user at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-user
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20141013/aa98e079/attachment.html>


More information about the Qgis-user mailing list