Reputation: 175
I am trying to retrieve the exact address from the given lat/lng using the following url,
The response JSON gives an array of results, the first object in the array has no address in the vicinity field. I would like to know if there is any other alternative for getting the address or is there any workaround to retrieve the exact address of the given lat/lng.
FYI - I prefer using Google Places API for address retrival.
Thanks in advance.
Upvotes: 1
Views: 1545
Reputation: 2303
If the vicinity contains no data, then use the formatted_address
or build the address by using the address_components
array.
Here you will find a description of the response object returned.
Upvotes: 1