相关疑难解决方法(0)

如何获得v2 android地图的地图中心?

在谷歌地图为Android v1,MapView有一个方便的方法: getMapCenter().现在我无法弄清楚如何使用此API的v2获取地图中心.我已经仔细阅读了API文档,但没有提到这样的功能.请指教.

谢谢,伊戈尔

android google-maps-api-2

75
推荐指数
5
解决办法
5万
查看次数

设置地图中心 - GMaps v2 - Android

如何使用GMaps v2将地图中心设置为特定位置?这就是我使用GMaps v1的方式:

public void setCenter( LatLng point )
{
  if( point.latitude*1000000 != 0 && point.longitude*1000000 != 0 )
  {
     if( mMapController != null )
     {
        mMapController.setCenter( point );
     }
     /*else if( mOpenStreetMapViewControllerSource != null )
     {
        mOpenStreetMapViewControllerSource.getController().setCenter( new org.osmdroid.util.GeoPoint( point.getLatitudeE6(), point.getLongitudeE6() ) );
        mPostponedSetCenterPoint = point;
     }*/
  }
}
Run Code Online (Sandbox Code Playgroud)

我查看了GMaps v2的API,找不到和类似的功能.我该怎么做呢?

android google-maps android-maps-v2

10
推荐指数
1
解决办法
2万
查看次数