大家好,我正在尝试获取用户的当前位置,并在地图上用覆盖层显示出来。我的问题是,用户的位置以位置形式呈现,而覆盖层数组只接受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?感谢大家的时间。