1
如何在android.I中使用反向地理编码获得更准确的位置我在这方面搜索了很多,但找不到所需的解决方案。是否有任何方法使用海拔高度和其他位置的反向位置地理编码获取位置?获取更准确的位置
编辑:
Geocoder geocoder = new Geocoder(this, Locale.ENGLISH);
try {
List<Address> addresses = geocoder.getFromLocation(latitude,
longitude, 5);
address=new ArrayList<String>();
log.debug(addresses.size());
if (addresses != null&&addresses.size()>0) {
Address fetchedAddress = addresses.get(0);
for (int i = 0; i < fetchedAddress.getMaxAddressLineIndex(); i++) {
address.add(fetchedAddress.getAddressLine(i));
}
}
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
Toast.makeText(getApplicationContext(), "Could not get address..!",
Toast.LENGTH_LONG).show();
}
}
这是我到目前为止已经试过。
亚去一次。这是可能的,但告诉我你到现在为止尝试过什么? –
你试过用google json WS吗? –
不,我试过geocoder – KKGanguly