void QgsWCSSourceSelect::addClicked() { QgsDebugMsg( "entered" ); QgsDataSourceURI uri = mUri; QString identifier = selectedIdentifier(); if ( identifier.isEmpty() ) { return; } uri.setParam( "identifier", identifier ); // Set crs only if necessary (multiple offered), so that we can decide in the // provider if WCS 1.0 with RESPONSE_CRS has to be used. Not perfect, they can // add more CRS in future and URI will be saved in project without any. // TODO: consider again, currently if crs in url is used to set WCS coverage CRS, // without that param user is asked for CRS //if ( selectedLayersCRSs().size() > 1 ) //{ uri.setParam( "crs", selectedCRS() ); //} QgsDebugMsg( "selectedFormat = " + selectedFormat() ); if ( !selectedFormat().isEmpty() ) { uri.setParam( "format", selectedFormat() ); } QgsDebugMsg( "selectedTime = " + selectedTime() ); if ( !selectedTime().isEmpty() ) { uri.setParam( "time", selectedTime() ); } QString cache; QgsDebugMsg( QString( "selectedCacheLoadControl = %1" ).arg( selectedCacheLoadControl() ) ); cache = QgsNetworkAccessManager::cacheLoadControlName( selectedCacheLoadControl() ); uri.setParam( "cache", cache ); emit addRasterLayer( uri.encodedUri(), identifier, "wcs" ); }
void QgsAmsSourceSelect::addServiceLayer( QString uri, QString typeName ) { emit addRasterLayer( uri, typeName, QStringLiteral( "arcgismapserver" ) ); }