Feature Layer not showing all features

4456
7
04-19-2011 08:12 AM
KeithNightlinger
New Contributor III
I setup a iOS service with an operational layer and a basemap layer.  The operational layer only shows a portion of the data in the feature layer.  Is there a limit on the number of features the ArcGIS for iOS app can handle?

The feature layer has approximatey 2200 records in it and is only showing around 900, maybe 1000.

The service appears OK if I pull into ArcMap.  But then again, I don't know if ArcMap pulls in the MapServer or the FeatureServer service.  Whereas the arcGIS for iOS specifies the FeatureService.

Any assistance on this would be great.
0 Kudos
7 Replies
SuganyaBaskaran
New Contributor
If you have initialized your feature layer in SnapShot mode, it retrieves only about 1000 at at time. You may try replacing that with
AGSFeatureLayer* featureLayer = [AGSFeatureLayer featureServiceLayerWithURL: url mode: AGSFeatureLayerModeOnDemand];

This link might help: http://help.arcgis.com/en/arcgismobile/10.0/apis/iPhone/concepts/index.html#/ArcGIS_Feature_Layer/00...
0 Kudos
DiveshGoyal
Esri Regular Contributor
Even in OnDemand mode, the number of feature retrieved will be limited by the 'max record count' property of the service (For instance, the map could load at a scale at which the feature layer might try to fetch all its features in the service and run into this max limit)

You could try bumping up the 'max record count' property on the service to work around this issue.
0 Kudos
KeithNightlinger
New Contributor III
I bumped up the feature limit count and it works, although this is a pilot layer with a subset of the features, the original layer has 220,000 features in it.

The on demand mode might be able to work as well, however it appears that can only be set when programming an app, I am using the ArcGIS for iOS app and I don't beleive there is an equivelent setting in there.  Thanks for the help though.
0 Kudos
DiveshGoyal
Esri Regular Contributor
The ArcGIS for iOS app already uses OnDemand mode for feature layers.
0 Kudos
KeithNightlinger
New Contributor III
OK, well that's good to know.  Does the "Maximum Records Returned by Server" setting, choose which features to return at the time of service start, or by the request of the client?

Essentially, would I be able to keep the default setting at 1000 features and set a scale threshold that would effectively limit the amount of records getting returned, or does the server choose the 1000 features when the service is created?
0 Kudos
DiveshGoyal
Esri Regular Contributor
The setting affects any query performed against the service.

If you set the initial extent of the map such that it contains only 500 features, you'll get to see all of them. But if you zoom out later to an extent that, say, contains 3000 features, you will only see the *first* n features (where n is the 'max record count' property of the service)
0 Kudos
GregSpiridonov
New Contributor III
I've had the same problem with flex, it's a limit to the quering, which ties to trying to speed up results... I created a bypass, by looping through queries, going with the max 500 points, i query the object id's < 500, and then continue to query, each time increasing by another 500... i loop through these results until the result count is 0... if you add up all those results, you get all the features.. of course, this is done with queries, and is not tied to featurelayer.
0 Kudos