Skip to content
Permalink
Browse files

Some cleaning

  • Loading branch information
pblottiere committed Jan 28, 2019
1 parent 8db9ab1 commit f841681c0628e5cd4de13f895026cad56b86f3e2
Showing with 3 additions and 4 deletions.
  1. +1 −1 src/core/qgsjsonutils.cpp
  2. +2 −3 src/server/services/wms/qgswmsrenderer.cpp
@@ -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;

0 comments on commit f841681

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