Skip to content

Commit

Permalink
fix: add new icon fields (#646)
Browse files Browse the repository at this point in the history
  • Loading branch information
jpoehnelt authored Sep 22, 2021
1 parent f0c7455 commit 105fe97
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 0 deletions.
2 changes: 2 additions & 0 deletions e2e/places/details.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ test("details should return all fields", async () => {
"formatted_phone_number",
"geometry",
"icon",
"icon_background_color",
"icon_mask_base_uri",
"international_phone_number",
"name",
"opening_hours",
Expand Down
2 changes: 2 additions & 0 deletions e2e/places/placesnearby.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ test("placesNearby should return correct result", async () => {
Array [
"geometry",
"icon",
"icon_background_color",
"icon_mask_base_uri",
"name",
"photos",
"place_id",
Expand Down
2 changes: 2 additions & 0 deletions e2e/places/textsearch.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ test("textsearch should return correct result", async () => {
"formatted_address",
"geometry",
"icon",
"icon_background_color",
"icon_mask_base_uri",
"name",
"photos",
"place_id",
Expand Down
11 changes: 11 additions & 0 deletions src/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -457,11 +457,22 @@ interface PlaceData {
plus_code: PlusCode;
/** contains the URL of a suggested icon which may be displayed to the user when indicating this result on a map. */
icon: string;
/**
* The default HEX color code for the place's category.
* @see https://developers.google.com/maps/documentation/places/web-service/icons
*/
icon_background_color: string;
/**
* The base URL for a non-colored icon, minus the file type extension (append `.svg` or `.png`).
* @see https://developers.google.com/maps/documentation/places/web-service/icons
*/
icon_mask_base_uri: string;
/**
* contains the place's phone number in international format.
* International format includes the country code, and is prefixed with the plus (+) sign.
* For example, the `international_phone_number` for Google's Sydney, Australia office is `+61 2 9374 4000`.
*/

international_phone_number: string;
/**
* contains the human-readable name for the returned result.
Expand Down

0 comments on commit 105fe97

Please sign in to comment.