views:

68

answers:

2

Is there a way to determine the State in which a given Lat/Long resides using the Google Api in Android?

thx

A: 

I assume you could use reverse geocoding to figure out the state. There was a similar question for android asked here: http://stackoverflow.com/questions/472313/android-reverse-geocoding-getfromlocation

quoo
A: 

As quoo mentionned, you can use reverse geocoding. From quoo's link,

Geocoder myLocation = new Geocoder(getApplicationContext(), Locale.getDefault());   
List<Address> myList = myLocation.getFromLocation(latPoint, lngPoint, 1);

You can get then the state by using the getAdminArea() method from the Address object.

myList.get(0).getAdminArea()

See more info here of what information you can get from the Address object

ccheneson