I have created a FeatureLayer from a sublayer of a Dynamic Layer. Queries to the FeatureLayer will only return 1,000 features at once. I've used the num and start properties of the Query object to page results in the past, however, both the Dynamic Layer and the sublayer have the Max Record Count property set to 5,000 on the server. So, I'd like to be able to take advantage of that.
When I observe my instance of the FeatureLayer in Developer Tools at runtime, it says the maxRecordCount is 1,000.
Any ideas why the FeatureLayer continues to default to 1,000? I've referenced other posts here that all suggest setting the MaxRecordCount is the fix. However, to my knowledge, the GIS folks have set this property as suggested.
I thought that this depended on what the REST service is setup to allow, and it defaults to 1000. So if it's your service and you have access to ArcGIS Manager you can allow more, but if not you are only able to ever get up to the 1000 limit. I have written code in the past to consume some one else's service that was limited to 1000 features, but I had to pull it in in groups, or hope that you can write a where clause for the query that comes in under 1000.
The REST service limits it to 1000 features, regardless of what the Max Record Count is. I typically get around this by querying for the ObjectIDs for the parameters that I want. This will give you an array of ObjectIDs for all the features you want, even if it's over 1000. Then, I divide the results into chunks of 1000 and make a query to fetch features based on their ObjectID.
Be careful though - if your browser submits too many queries at once, you'll run into some issues. If there are several chunks of 1000, you may need to write some code to wait for a batch to finish before running the next one.