How do I fetch state & country from latitude & longitude ?
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- Posts: 2
- Joined: Fri Apr 20, 2012 9:31 am
- Contact:
How do I fetch state & country from latitude & longitude ?
How can we fetch city,state and country from latitude and longitude ?
Re: How do I fetch state & country from latitude & longitude
define tLat and tLng with your coordinates, then
parse the results returned, there's lots of information you can gain. "AdministrativeAreaName" is county level in UK, but returns the state in USA. A US county is returned in various forms under "SubAdministrativeArea" > "Locality" > "LocalityName", or just under "SubAdministrativeAreaName" etc etc in one form or another under a set of point ids returned in the results. Check through and see what you think is best to extract.
Code: Select all
get url ("http://maps.googleapis.com/maps/geo?ll=" & tLat & comma & tLng)
put it