Google\'s demo has this snippet to capture, by pagination, more than 20 results from place search:
service.nearbySearch(request, resultList, function(sta
here's how i've done it. I'm no guru on this stuff but here's my code.
To start with you may need to strip the search call back out of function() into it's own function.
I've got something like
placesServiceClass.search(request, placesCallback);
in your callback for restuls processing just do something like...
function placesCallback(results, status, pagination) {
// process the resutls
if (status == google.maps.places.PlacesServiceStatus.OK) {
for (var int = 0; int < results.length; int++) {
placesManager.addMarker(results[int], int);
}
}
if (pagination.hasNextPage) {
sleep:2;
pagination.nextPage();
}
The Google documentation states that you need to wait 2 seconds between next page calls, hence the sleep.
The pagination.nextPage() calls the same callback, in my case placesCallback().
Hope that helps
Use Radar Search to get more results at once. You can then call PlacesService.getDetails() for more details on each of those places.