Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Added pagetoken parameter to places search API #26

Merged
merged 1 commit into from

3 participants

Brandon Wamboldt Matthew Creager Fabrizio Moscon
Brandon Wamboldt

I want to be able to add paginated results to my application, but the API call is missing a pagetoken parameter.

See: https://developers.google.com/places/documentation/search

No BC breaks, very minimal change.

Fabrizio Moscon fabriziomoscon merged commit b13bd63 into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jul 16, 2013
  1. Brandon Wamboldt
This page is out of date. Refresh to see the latest.
Showing with 5 additions and 1 deletion.
  1. +5 −1 lib/googlemaps.js
6 lib/googlemaps.js 100644 → 100755
View
@@ -51,7 +51,7 @@ exports.config = config = function(key, value) {
};
// http://code.google.com/apis/maps/documentation/places/
-exports.places = function(latlng, radius, key, callback, sensor, types, lang, name, rankby) {
+exports.places = function(latlng, radius, key, callback, sensor, types, lang, name, rankby, pagetoken) {
var args = {
location: latlng,
@@ -82,6 +82,10 @@ exports.places = function(latlng, radius, key, callback, sensor, types, lang, na
args.name = name;
}
+ if (typeof pagetoken !== "undefined" && pagetoken !== null) {
+ args.pagetoken = pagetoken;
+ }
+
args.sensor = sensor || 'false';
return makeRequest('/maps/api/place/search/json', args, true, returnObjectFromJSON(callback));
Something went wrong with that request. Please try again.