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

2013-10-03 Thread Luca Manganelli
On Wed, Oct 2, 2013 at 6:10 PM, Enzo Ciarmoli wrote: > ** > QgsRasterLayer constructor has changed, now it accept four arguments, the > first is the uri string. > > To construct the uri string you must know what layers you want. > > You could try this: > > desired_layer = 'abcdefg' > uri = 'crs=E

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

2013-10-02 Thread Enzo Ciarmoli
>From: Luca Manganelli >To: qgis-developer >Subject: [Qgis-developer] Adding a WMS layer in QGIS 2.0 (python) > >Hi, >the QgsRasterLayer costructor has changed. If I try this: > >rlayer = >QgsRasterLayer('http://testsrv/mapaccel?map=ciao.map&crs=EPSG:25

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

2013-10-01 Thread Luca Manganelli
On Tue, Oct 1, 2013 at 4:10 PM, Luca Manganelli wrote: > Hi, [...] > using the QgisInterface.addRasterLayer popus a dialog box with this error: GDAL provider: Cannot open GDAL dataset http://testsrv/mapaccel?map=test.map: Failed to create temporary file:/tmp/test.map (d:\src\qgis-2.0.1\src\p

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

2013-10-01 Thread Luca Manganelli
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 adde