Is there a way to determine the State in which a given Lat/Long resides using the Google Api in开发者_Python百科 Android?
thx
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
I assume you could use reverse geocoding to figure out the state. There was a similar question for android asked here: Android: Reverse geocoding - getFromLocation
精彩评论