I created a PointsOfInterestSearch (https://developer.apple.com/documentation/mapkitjs/pointsofinterestsearch) on the frontend using MapKit JS:
const poiSearch = new window.mapkit.PointsOfInterestSearch({
center: new mapkit.Coordinate(userLocation.lat, userLocation.lng),
radius: 10000,
});
poiSearch.search((error, results) => {
console.log("Length of poiSearch:", results.places.length);
results.places.forEach((place) => {
console.log("Name:", place.name);
});
});
The length of results.places
is 20. Trying it with a bigger radius also still results in 20.
The docs for PointsOfInterestSearchResponse
shows only a places
(https://developer.apple.com/documentation/mapkitjs/pointsofinterestsearchresponse) and no options for pagination.
How can I paginate the rest of the results?