【发布时间】:2011-09-04 05:03:45
【问题描述】:
我想要用户的位置,并且在该用户自己导航后也只需要一次
locationManager = (LocationManager)this.getSystemService(LOCATION_SERVICE);
location = locationManager.getLastKnownLocation(LocationManager.GPS_PROVIDER);
if (location != null) {
System.out.println(location.toString());
lat=location.getLatitude();
lng=location.getLongitude();
}
p = new GeoPoint((int) (lat * 1E6), (int) (lng * 1E6));
但是我无法获取用户的位置,是因为手机的互联网连接速度慢吗??
【问题讨论】:
-
我已经尝试了很多选项,但仍然无法解决,所以由于烦躁而发布它无论如何都解决了。
标签: android google-maps location