我想获取特定地址的纬度和经度。我该怎么做?
最佳答案
这是样本 solution对你的问题。
或
List<Address> foundGeocode = null;
/* find the addresses by using getFromLocationName() method with the given address*/
foundGeocode = new Geocoder(this).getFromLocationName("address here", 1);
foundGeocode.get(0).getLatitude(); //getting latitude
foundGeocode.get(0).getLongitude();//getting longitude
更多详情Geocoder
关于android - 如何从Android上的给定地址获取纬度和经度?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6466369/