Skip to content

Commit 060b3e3

Browse files
authoredNov 23, 2017
[ArcGIS REST] fix fallback feature id value (followup to f32791e)
1 parent f32791e commit 060b3e3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed
 

‎src/providers/arcgisrest/qgsafsshareddata.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ bool QgsAfsSharedData::getFeature( QgsFeatureId id, QgsFeature &f, bool fetchGeo
8686
{
8787
QVariantMap featureData = featuresData[i].toMap();
8888
QgsFeature feature;
89-
int objectId = startId + i;
89+
int featureId = startId + i;
9090

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

108108
// Set FID
109-
feature.setId( startId + objectIds.indexOf( objectId ) );
109+
feature.setId( featureId );
110110

111111
// Set geometry
112112
if ( fetchGeometry )

0 commit comments

Comments
 (0)
Please sign in to comment.