Hi qgis-developer group! I have one question!!!
I'm programmin raster from geoserver wms. But QGIS cookbook sample wms uri string is error : ERROR 4: `IgnoreGetMapUrl=1&format=image/png&layers=ADD_SelfDrivingCar:cell35_07_1_8b3b_AutoCrop&maxHeight=256&maxWidth=256&srs=EPSG:4326&styles=&url=http://192.168.0.21:8080/geoserver/wms <http://192.168.0.21:8080/geoserver/wms>' does not exist in the file system, and is not recognised as a supported dataset name. My source code below : QgsDataSourceURI uri; uri.setParam("url", "http://192.168.0.21:8080/geoserver/wms <http://192.168.0.21:8080/geoserver/wms>"); uri.setParam("format", "image/png"); uri.setParam("crs", "EPSG:4326"); uri.setParam("layers","ADD_SelfDrivingCar:cell35_07_1_8b3b_AutoCrop"); uri.setParam( "maxWidth", "256" ); uri.setParam( "maxHeight", "256"); uri.setParam( "styles", "" ); uri.setParam( "IgnoreGetMapUrl", "1" ); QgsRasterLayer * pRasterLayer = new QgsRasterLayer(QString(uri.encodedUri()), "ADD_SelfDrivingCar:cell35_07_1_8b3b_AutoCrop", "wms"); if (pRasterLayer->isValid()) { qDebug("Raster Layer is valid"); } else { qDebug("Raster Layer is NOT valid"); return; } why this uri is error? please tell me How to make uri string. Please! Thanks.
_______________________________________________ Qgis-developer mailing list Qgis-developer@lists.osgeo.org List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer