mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-03 00:05:24 -04:00
fixed occurrence of gml:featureMember elements in GetFeatureInfo response in application/vnd.ogc.gml format
This commit is contained in:
parent
b27780db9b
commit
325697dd4b
@ -1475,13 +1475,6 @@ int QgsWMSServer::featureInfoFromVectorLayer( QgsVectorLayer* layer,
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Creates the gml:featureMember only if we have at least one element
|
|
||||||
if ( infoFormat.startsWith( "application/vnd.ogc.gml" ) && featureCounter == 1 )
|
|
||||||
{
|
|
||||||
QDomElement realLayerElement = infoDocument.createElement( "gml:featureMember"/*wfs:FeatureMember*/ );
|
|
||||||
layerElement.appendChild( realLayerElement );
|
|
||||||
layerElement = realLayerElement;
|
|
||||||
}
|
|
||||||
|
|
||||||
QgsFeatureRendererV2* r2 = layer->rendererV2();
|
QgsFeatureRendererV2* r2 = layer->rendererV2();
|
||||||
if ( !r2 )
|
if ( !r2 )
|
||||||
@ -1504,7 +1497,9 @@ int QgsWMSServer::featureInfoFromVectorLayer( QgsVectorLayer* layer,
|
|||||||
bool withGeom = layer->wkbType() != QGis::WKBNoGeometry;
|
bool withGeom = layer->wkbType() != QGis::WKBNoGeometry;
|
||||||
int version = infoFormat.startsWith( "application/vnd.ogc.gml/3" ) ? 3 : 2;
|
int version = infoFormat.startsWith( "application/vnd.ogc.gml/3" ) ? 3 : 2;
|
||||||
QDomElement elem = createFeatureGML( &feature, infoDocument, layerCrs, layer->name(), withGeom, version );
|
QDomElement elem = createFeatureGML( &feature, infoDocument, layerCrs, layer->name(), withGeom, version );
|
||||||
layerElement.appendChild( elem );
|
QDomElement featureMemberElem = infoDocument.createElement( "gml:featureMember"/*wfs:FeatureMember*/ );
|
||||||
|
featureMemberElem.appendChild( elem );
|
||||||
|
layerElement.appendChild( featureMemberElem );
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user