android:关于百度地图

来源:互联网 发布:字符串转json对象 js 编辑:程序博客网 时间:2024/06/07 05:31

1,设置中心点

MapStatusUpdate u = MapStatusUpdateFactory.newLatLng(point);
mBaiduMap.animateMapStatus(u);
point为LatLng类型

2,去掉自带的缩放控件,logo,比例尺的方法

// 去掉缩放控件
int childCount = mMapView.getChildCount();
View zoom = null;
for (int i = 0; i < childCount; i++) {
View child = mMapView.getChildAt(i);
if (child instanceof ZoomControls) {
zoom = child;
break;
}
}
zoom.setVisibility(View.GONE);


// 去掉百度地图logo
mMapView.removeViewAt(1);
// 去掉地图上比例尺
mMapView.removeViewAt(2);

0 0
原创粉丝点击