android 百度地图开发 新手求助

2025-03-12 09:36:05
推荐回答(1个)
回答1:

//初始化地图
//定义中心点
GeoPoint point = new GeoPoint((int) (4.818* 1E6),(int) (1.697 * 1E6));
mMapView = (MapView)findViewById(R.id.bmapView);
mMapView.getController().enableClick(true);
//缩放级别
mMapView.getController().setZoom(8);
//设置中心点
mMapView.getController().setCenter(point);