Reputation: 730
I am trying to get Street, City and Country with reverse geocoding using google map example https://developers.google.com/maps/documentation/javascript/examples/geocoding-reverse, But all it gives me is .formatted_address
not street, city and country.
Is there any way where I can get Street, City and Country separately ?
Upvotes: 3
Views: 1344
Reputation: 460
Use .address_components
instead of .formatted_address
, through Address Components you can break the result into different variables and then call it into your info window. Fiddle Link
Upvotes: 4