Skip to content
Permalink
Browse files

Fix wms getfeatureinfo json with composite pks

Fixes #39682
  • Loading branch information
elpaso committed Oct 28, 2020
1 parent 8ba0606 commit a70e79b9839c62b5bac2f54a4d1100e2bbee5d68
Showing with 5 additions and 2 deletions.
  1. +5 −2 src/server/services/wms/qgswmsrenderer.cpp
@@ -2246,8 +2246,11 @@ namespace QgsWms
for ( int j = 0; j < featuresNode.size(); ++j )
{
const QDomElement featureNode = featuresNode.at( j ).toElement();
const QgsFeatureId fid = featureNode.attribute( QStringLiteral( "id" ) ).toLongLong();
QgsFeature feature = QgsFeature( vl->getFeature( fid ) );
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 );

QString wkt;
if ( withGeometry )

0 comments on commit a70e79b

Please sign in to comment.
You can’t perform that action at this time.