【发布时间】:2012-07-29 17:01:47
【问题描述】:
所有-我试图获取用户的当前位置,而不是在地图上显示带有覆盖项的位置。我的问题是用户的位置是作为一个位置进来的,而覆盖数组只接受 GeoPoints。这是我尝试过的:
LocationListener locationListener = new LocationListener() {
public void onLocationChanged(Location location) {
GeoPoint point = new GeoPoint.valueOf(location);
OverlayItem overlayitem4 = new OverlayItem(point, "You Are Here", "Boulder, CO");
}
但我在GeoPoint.valueOf(location); 上遇到错误,具体来说:
GeoPoint.valueOf 无法解析为类型`
所以我的问题是如何从位置转换为 GeoPoint? 谢谢大家的宝贵时间。
【问题讨论】:
标签: android google-maps location overlay