Added pagination example

Sort of thinking there needs to be a "walk" method. Something like $places->walk('method') so you can be all like while (...) { ... } and easily spin through. Also considering a "next" method to help grab page 2 so you're now passing around variables (that's still allowed to, I guess)
This commit is contained in:
Josh Sherman 2012-12-14 01:03:02 -05:00
parent d055fa49dd
commit ec8b181f13

View file

@ -19,7 +19,7 @@ Usage Examples
```php
require_once 'GooglePlaces.php';
$google_places = new GooglePlaces('_YOUR_API_KEY');
$google_places = new GooglePlaces('_YOUR_API_KEY_');
```
### Search nearby, ranked by prominence
@ -39,6 +39,13 @@ $google_places->types = 'restaurant'; // Requires keyword, name or types
$results = $google_places->searchNearby();
```
### Second page of search nearby results
```php
$google_plages->pageToken = $results['next_page_token'];
$page2_results = $google_places->searchNearby();
```
The Fututre
-----------