-
Notifications
You must be signed in to change notification settings - Fork 126
Open
Description
The queryAllFeatures method performs an initial service request to obtain the maxRecordCount of the feature layer being loaded:
arcgis-rest-js/packages/arcgis-rest-feature-service/src/query.ts
Lines 287 to 296 in 9ec8158
| const pageSizeResponse = await request(requestOptions.url, { | |
| httpMethod: "GET", | |
| authentication: requestOptions.authentication | |
| }); | |
| // default the pageSize to 2000 if it is not provided | |
| const pageSize = pageSizeResponse.maxRecordCount || 2000; | |
| const userRecordCount = requestOptions.params?.resultRecordCount; | |
| // use the user defined count only if it's less than or equal to the page size, otherwise use pageSize | |
| const recordCountToUse = | |
| userRecordCount && userRecordCount <= pageSize ? userRecordCount : pageSize; |
As you can see in this excerpt, the response from the request is only used if the user does not specify a value for resultRecordCount. If the resultRecordCount parameter is provided, the response from this request will be discarded.
If a user provides this resultRecordCount parameter, this request should be skipped entirely. It will improve performance in environments like MapLibre ArcGIS.
Metadata
Metadata
Assignees
Labels
No labels