Skip to content

Commit 47db368

Browse files
tcliff111Tom Clifford
andauthored
feat: Added Address Descriptors to Geocoding response. (#1187)
* 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 <[email protected]>
1 parent 9eed6db commit 47db368

File tree

8 files changed

+3596
-1919
lines changed

8 files changed

+3596
-1919
lines changed

e2e/geocode/reversegeocode.test.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,19 @@ test("reverseGeocode should return correct response using place_id", async () =>
3636
const r = await reverseGeocode({ params: params });
3737
expect(r.data.results.length).toBeTruthy();
3838
});
39+
40+
41+
test("reverseGeocode should return correct response when address descriptors are enabled", async () => {
42+
const params = {
43+
latlng: {
44+
lat: 28.650080,
45+
lng: 77.233172,
46+
},
47+
enable_address_descriptor: true,
48+
key: process.env.GOOGLE_MAPS_API_KEY,
49+
};
50+
const r = await reverseGeocode({ params: params });
51+
console.log("Response data:", r.data);
52+
console.log("Address descriptor:", r.data.address_descriptor);
53+
expect(r.data.address_descriptor.landmarks.length > 0).toBeTruthy();
54+
});

0 commit comments

Comments
 (0)