Hi,
Is there a way to load services capabilities (layers, SRCs, styles...)
using PyQGIS ?
Until now I'm using OWSLib because I knew the lib and it's included in
QGIS, but I'm looking for a proper way and I can't find it. I would expect
a behavior similar to the UI widget:
wms = provider.provider("wms", "
https://geobretagne.fr/geoserver/lorientagglo/wms?request=GetCapabilities&service=WMS
")
wms.subLayers()
> [layer1, layer2...]
wms_lyr = wms.getLayer("layer1")
lyr = QgsRasterLayer(wms_lyr.uri(), "wms_lyr.title", "wms")
QgsMapLayerRegistry.instance().addMapLayer(lyr)
Regards,
Julien
--
Julien Moura
Chef de projets & community manager
*Tél : +33 (0)**6 58 00 30 64*
26 rue du Faubourg Saint-Antoine – 75012 Paris
Métro Bastille
_______________________________________________
QGIS-Developer mailing list
[email protected]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer