From 344bbbb84eee3a0c84570b03f52435e9557004a2 Mon Sep 17 00:00:00 2001 From: lostintime Date: Sat, 22 Apr 2017 17:05:08 +0300 Subject: [PATCH 1/2] Add "type" to accepted params list for place-search-nearby --- lib/config/constants.json | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/config/constants.json b/lib/config/constants.json index 7ecb8aa..2bfdfe9 100644 --- a/lib/config/constants.json +++ b/lib/config/constants.json @@ -22,6 +22,7 @@ "radius": "number", "rankby": "string", "sensor": "string", + "type": "string", "types": "string" }, "place-search-text": { From ef5f9dc9dd884260d455bbcb2474bd208dd6195a Mon Sep 17 00:00:00 2001 From: lostintime Date: Sat, 22 Apr 2017 17:06:54 +0300 Subject: [PATCH 2/2] Do not set default value for radius arg, when specified - it affects nearbysearch ranking --- lib/placeSearchNearby.js | 4 ---- 1 file changed, 4 deletions(-) diff --git a/lib/placeSearchNearby.js b/lib/placeSearchNearby.js index 67297e0..76b7298 100644 --- a/lib/placeSearchNearby.js +++ b/lib/placeSearchNearby.js @@ -56,10 +56,6 @@ module.exports = function(params, callback) { return callback(new Error('If rankby=distance is specified, then one or more of keyword, name, or types is required.')); } delete args.radius; - } else if (args.rankby === PLACES_RANKBY_DEFAULT) { - if (args.radius == null) { - args.radius = MAX_RADIUS; - } } if (args.radius != null) {