Android Google Maps Api V2,获取当前地图中心的坐标

CQM*_*CQM 6 android google-maps-android-api-2

我正在使用Android Google Maps Api V2(不是MapView或MapActivity),我很难获得地图中心的坐标.

我在考虑使用

@Override
public void onCameraChange(CameraPosition arg0) {
    // TODO Auto-generated method stub
    geoCodeCenter(/*Location object*/);
}
Run Code Online (Sandbox Code Playgroud)

但我无法从CameraPosition对象获取lat/long.相机也有更多的尺寸,因为你现在也可以看到不同间距的地图,所以获得纬度/经度的中心是不一样的,因为用户不能保证从鸟瞰图看地图,除非某些手势被禁用.

有一个更好的方法吗?我不希望用户长时间点击标记将其拖动到地图上,我希望他们只需知道用户平移地图中心的位置.

map.getMyLocation()方法适用于其他方法,例如当前的LocationProvider位置.尽管我使用GPS并且它仍然返回null,但也看似不是选项

Com*_*are 14

但我无法从CameraPosition对象获取lat/long

根据我对文档的阅读,a 上的target公共数据成员CameraPositionLatLng地图中心的成员.