mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-28 00:17:30 -05:00
Some cleaning
This commit is contained in:
parent
8db9ab1563
commit
f841681c06
@ -239,7 +239,7 @@ QString QgsJsonExporter::exportFeatures( const QgsFeatureList &features ) const
|
||||
|
||||
QString layerName;
|
||||
if ( mIncludeName )
|
||||
layerName.append( QStringLiteral( "\n \"name\": \"%1\",\n" ).arg( mLayer->name() ) );
|
||||
layerName = QStringLiteral( "\n \"name\": \"%1\",\n" ).arg( mLayer->name() );
|
||||
|
||||
return QStringLiteral( "{%1 \"type\": \"FeatureCollection\",\n \"features\":[\n%2\n]}" ).arg( layerName, featureJSON.join( QStringLiteral( ",\n" ) ) );
|
||||
}
|
||||
|
@ -2281,8 +2281,7 @@ namespace QgsWms
|
||||
QByteArray QgsRenderer::convertFeatureInfoToJson( const QList<QgsMapLayer *> &layers, const QDomDocument &doc ) const
|
||||
{
|
||||
QString json;
|
||||
json.append( QStringLiteral( "{" ) );
|
||||
json.append( QStringLiteral( "\"layers\":[" ) );
|
||||
json.append( QStringLiteral( "{\n\"layers\":[" ) );
|
||||
|
||||
const bool withGeometry = ( QgsServerProjectUtils::wmsFeatureInfoAddWktGeometry( *mProject ) && mWmsParameters.withGeometry() );
|
||||
|
||||
@ -2318,7 +2317,7 @@ namespace QgsWms
|
||||
for ( int j = 0; j < featuresNode.size(); ++j )
|
||||
{
|
||||
const QDomElement featureNode = featuresNode.at( j ).toElement();
|
||||
const qint64 fid = featureNode.attribute( QStringLiteral( "id" ) ).toLongLong();
|
||||
const QgsFeatureId fid = featureNode.attribute( QStringLiteral( "id" ) ).toLongLong();
|
||||
const QgsFeature feature = vl->getFeature( fid );
|
||||
features << feature;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user