[Qgis-developer] Adding a WMS layer in QGIS 2.0 (python)

Luca Manganelli luca76 at gmail.com
Tue Oct 1 07:10:14 PDT 2013


Hi,

the QgsRasterLayer costructor has changed. If I try this:


rlayer = QgsRasterLayer('
http://testsrv/mapaccel?map=ciao.map&crs=EPSG:25832&format=image/png',
'test', 'wms')

QgsMapLayerRegistry.instance().addMapLayer(rlayer)

self.iface.mapCanvas().refresh()


the wms raster layer is never added to map. How can I fix this?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20131001/1fc2eb43/attachment.html>


More information about the Qgis-developer mailing list