-
Notifications
You must be signed in to change notification settings - Fork 126
Open
Labels
good first issueGood for newcomers and beginnersGood for newcomers and beginners
Description
Description
We should update the docs for the various method that support nextPage() function. This means:
- Anything returning (
ISearchResults](https://developers.arcgis.com/arcgis-rest-js/api-reference/arcgis-rest-portal/ISearchResult/) sosearchItems(),searchGroups(),searchUsers() findPlacesNearPoint()andfindPlacesNearExtent()- Add
nextPage()support toqueryFeatures()https://developers.arcgis.com/arcgis-rest-js/api-reference/arcgis-rest-feature-service/IQueryFeaturesResponse/
We should also document the pattern to paginate thorough resuts to get all results which generally looks like this:
function async getAllResults (response) {
let allItems = lastResponse.results;
// Keep getting the next page until there are no more pages.
while (lastResponse.nextPage) {
lastResponse = await lastResponse.nextPage();
allItems = allItems.concat(lastResponse.results);
}
return allItems;
}
const allResults = await searchItems(options).then(getAllResults)Link to page
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
good first issueGood for newcomers and beginnersGood for newcomers and beginners