`

Android百度地图常用方法汇总(AndroidSDK_v2.4.1)

 
阅读更多

1.地图初始化

private void initMapView() {
 mapView = (MapView) this.findViewById(R.id.bmapView);
 // 设置启用内置的缩放控件 
 mapView.setBuiltInZoomControls(true); 
 mapView.getController().setZoom(15);
 // 调整地图中心点   
    mapView.getController().setCenter(new GeoPoint((int) (39.915 * 1E6), (int) (116.404 * 1E6))); 
}

 

2.获取地图中心点坐标

GeoPoint pos = mapView.getMapCenter();

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics