File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -2282,6 +2282,8 @@ namespace QgsWms
22822282 {
22832283 QString json;
22842284
2285+ const bool withGeometry = ( QgsServerProjectUtils::wmsFeatureInfoAddWktGeometry ( *mProject ) && mWmsParameters .withGeometry () );
2286+
22852287 const QDomNodeList layerList = doc.elementsByTagName ( QStringLiteral ( " Layer" ) );
22862288 for ( int i = 0 ; i < layerList.size (); ++i )
22872289 {
@@ -2317,7 +2319,7 @@ namespace QgsWms
23172319 const QgsFeature feature = vl->getFeature ( fid );
23182320 features.append ( feature );
23192321
2320- // search attributes to export
2322+ // search attributes to export (one time only)
23212323 if ( not attributes.isEmpty () )
23222324 continue ;
23232325
@@ -2335,6 +2337,7 @@ namespace QgsWms
23352337 // export
23362338 QgsJsonExporter exporter ( vl );
23372339 exporter.setAttributes ( attributes );
2340+ exporter.setIncludeGeometry ( withGeometry );
23382341 json.append ( exporter.exportFeatures ( features ) );
23392342 }
23402343 else // raster layer
You can’t perform that action at this time.
0 commit comments