Skip to content

Commit 85a7858

Browse files
committed
Support all placeFields when calling lookUpPlaceByID
1 parent 6ef4ee1 commit 85a7858

3 files changed

Lines changed: 3 additions & 4 deletions

File tree

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -455,9 +455,8 @@ OR
455455

456456
**PLACE FIELDS**
457457
- To prevent yourself from incurring huge usage bill, you can select the result fields you need in your application. Pass an *(optional)* `placeFields` as the second param to `lookUpPlaceByID`.
458-
- **placeFields** is an **`Array`** of `String` such as `placeID`, `location`, `name`, `address`, `types`, `openingHours`, `plusCode`, `rating`, `userRatingsTotal`, `viewport`.
458+
- **placeFields** is an **`Array`** of `String` such as `placeID`, `location`, `name`, `address`, `types`, `openingHours`, `plusCode`, `rating`, `userRatingsTotal`, `viewport`, `addressComponents`, `website`, `phoneNumber`, and `phoneNumber`.
459459
- Defaults to an empty array which returns every field possible for the particular place.
460-
- Place note that requesting for `website`, `phoneNumber`, `phoneNumber` and `addressComponents` are not supported when calling `lookUpPlaceByID`.
461460

462461
#### Example Response from Calling lookUpPlaceByID()
463462

android/src/main/java/com/arttitude360/reactnative/rngoogleplaces/RNGooglePlacesModule.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ public void lookUpPlaceByID(String placeID, ReadableArray fields, final Promise
287287
return;
288288
}
289289

290-
List<Place.Field> selectedFields = getPlaceFields(fields.toArrayList(), true);
290+
List<Place.Field> selectedFields = getPlaceFields(fields.toArrayList(), false);
291291

292292
FetchPlaceRequest request = FetchPlaceRequest.builder(placeID, selectedFields).build();
293293

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"description": "iOS/Android Google Places Widgets (Autocomplete Modals) and API Services for React Native Apps",
44
"main": "index.js",
55
"author": "Tolu Olowu (Arttitude 360) <tolu@arttitude360.com>",
6-
"version": "3.1.0",
6+
"version": "3.1.1",
77
"scripts": {},
88
"repository": {
99
"type": "git",

0 commit comments

Comments
 (0)