【发布时间】:2013-11-29 09:48:26
【问题描述】:
我从getLastKnownLocation()获得我的当前位置
location = locationManager.getLastKnownLocation(LocationManager.NETWORK_PROVIDER);
但是当我得到Geocoder 的地址时,它给我的不是我真正所在的地址。
当我转到Google Map Application 时,它给了我真正的位置。
地理编码器:
List<Address> addresses = geocoder.getFromLocation(location.getLatitude(), location.getLongitude(), 10);
for (Address address : addresses) {
System.out.println("my location .."+address.getAddressLine(0));
}
那么为什么我不能用getLastKnownLocation() 检索到真正的当前位置,但 Google 可以呢?
有没有更准确的方法来获取我的当前位置?
【问题讨论】:
标签: android google-maps gps locationmanager