Skip to content

Commit

Permalink
[afs] Don't list layers with no Query capability in AFS source select
Browse files Browse the repository at this point in the history
Since these layers cannot be queried or added to the map and should
be added as mapserver layers instead.
  • Loading branch information
nyalldawson committed Feb 20, 2018
1 parent 9e023bd commit 93920d2
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/providers/arcgisrest/qgsafssourceselect.cpp
Expand Up @@ -67,6 +67,11 @@ bool QgsAfsSourceSelect::connectToService( const QgsOwsConnection &connection )
layerErrors.append( tr( "Layer %1: %2 - %3" ).arg( layerInfoMap[QStringLiteral( "id" )].toString(), errorTitle, errorMessage ) );
continue;
}
if ( !layerData.value( QStringLiteral( "capabilities" ) ).toString().contains( QStringLiteral( "query" ), Qt::CaseInsensitive ) )
{
QgsDebugMsg( QStringLiteral( "Layer %1 does not support query capabilities" ).arg( layerInfoMap[QStringLiteral( "id" )].toString() ) );
continue;
}
// insert the typenames, titles and abstracts into the tree view
QStandardItem *idItem = new QStandardItem( layerData[QStringLiteral( "id" )].toString() );
bool ok = false;
Expand Down

0 comments on commit 93920d2

Please sign in to comment.