开发者

Determine the State given a Lat/Long using Google API in android

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜