Skip to content
Permalink
Browse files

[ArcGIS REST] fix fallback feature id value (followup to f32791e)

  • Loading branch information
nirvn committed Nov 23, 2017
1 parent f32791e commit 060b3e3a54b7441e253cf49c2cacbdd557d3b327
Showing with 3 additions and 3 deletions.
  1. +3 −3 src/providers/arcgisrest/qgsafsshareddata.cpp
@@ -86,7 +86,7 @@ bool QgsAfsSharedData::getFeature( QgsFeatureId id, QgsFeature &f, bool fetchGeo
{
QVariantMap featureData = featuresData[i].toMap();
QgsFeature feature;
int objectId = startId + i;
int featureId = startId + i;

// Set attributes
if ( !fetchAttribIdx.isEmpty() )
@@ -99,14 +99,14 @@ bool QgsAfsSharedData::getFeature( QgsFeatureId id, QgsFeature &f, bool fetchGeo
attributes[idx] = attributesData[mFields.at( idx ).name()];
if ( mFields.at( idx ).name() == QStringLiteral( "OBJECTID" ) )
{
objectId = attributesData[mFields.at( idx ).name()].toInt();
featureId = startId + objectIds.indexOf( attributesData[mFields.at( idx ).name()].toInt() );
}
}
feature.setAttributes( attributes );
}

// Set FID
feature.setId( startId + objectIds.indexOf( objectId ) );
feature.setId( featureId );

// Set geometry
if ( fetchGeometry )

0 comments on commit 060b3e3

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