Skip to content

Commit

Permalink
feat: Added Address Descriptors to Geocoding response. (#1187)
Browse files Browse the repository at this point in the history
* feat! Added Address Descriptors to Geocoding response.

* feat! Added Address Descriptors to Geocoding response.

* feat! Added Address Descriptors to Geocoding response.

* feat! Added Address Descriptors to Geocoding response.

* feat! Added Address Descriptors to Geocoding response.

* Revert "Merge branch 'master' into address_descriptors"

This reverts commit 6a4c4c0, reversing
changes made to 236004d.

---------

Co-authored-by: Tom Clifford <thomasclifford@google.com>
  • Loading branch information
tcliff111 and Tom Clifford authored Apr 9, 2024
1 parent 9eed6db commit 47db368
Show file tree
Hide file tree
Showing 8 changed files with 3,596 additions and 1,919 deletions.
16 changes: 16 additions & 0 deletions e2e/geocode/reversegeocode.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,19 @@ test("reverseGeocode should return correct response using place_id", async () =>
const r = await reverseGeocode({ params: params });
expect(r.data.results.length).toBeTruthy();
});


test("reverseGeocode should return correct response when address descriptors are enabled", async () => {
const params = {
latlng: {
lat: 28.650080,
lng: 77.233172,
},
enable_address_descriptor: true,
key: process.env.GOOGLE_MAPS_API_KEY,
};
const r = await reverseGeocode({ params: params });
console.log("Response data:", r.data);
console.log("Address descriptor:", r.data.address_descriptor);
expect(r.data.address_descriptor.landmarks.length > 0).toBeTruthy();
});
Loading

0 comments on commit 47db368

Please sign in to comment.