Skip to content

Commit

Permalink
Different code path for unsupported providers
Browse files Browse the repository at this point in the history
  • Loading branch information
elpaso committed Oct 28, 2020
1 parent a70e79b commit 3f88d74
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions src/server/services/wms/qgswmsrenderer.cpp
Expand Up @@ -2247,10 +2247,18 @@ namespace QgsWms
{
const QDomElement featureNode = featuresNode.at( j ).toElement();
const QString fid = featureNode.attribute( QStringLiteral( "id" ) );
QgsFeatureRequest request { QgsExpression( QgsServerFeatureId::getExpressionFromServerFid( fid, static_cast<QgsVectorDataProvider *>( layer->dataProvider() ) ) )};
request.setFlags( QgsFeatureRequest::Flag::NoGeometry );
QgsFeature feature;
vl->getFeatures( request ).nextFeature( feature );
const QString expression { QgsServerFeatureId::getExpressionFromServerFid( fid, static_cast<QgsVectorDataProvider *>( layer->dataProvider() ) ) };
if ( expression.isEmpty() )
{
feature = vl->getFeature( fid.toLongLong() );
}
else
{
QgsFeatureRequest request { QgsExpression( expression )};
request.setFlags( QgsFeatureRequest::Flag::NoGeometry );
vl->getFeatures( request ).nextFeature( feature );
}

QString wkt;
if ( withGeometry )
Expand Down

0 comments on commit 3f88d74

Please sign in to comment.