android 百度最新地图sdk包怎么去除 放大缩小按钮
发布网友
发布时间:2022-05-24 14:46
我来回答
共2个回答
热心网友
时间:2023-10-17 13:13
// 隐藏缩放控件
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);
// 隐藏比例尺控件
int count = mMapView.getChildCount();
View scale = null;
for (int i = 0; i < count; i++) {
View child = mMapView.getChildAt(i);
if (child instanceof ZoomControls) {
scale = child;
break;
}
}
scale.setVisibility(View.GONE);
// 隐藏指南针
mUiSettings = mBaiMap.getUiSettings();
mUiSettings.setCompassEnabled(true);
// 删除百度地图logo
mMapView.removeViewAt(1);
热心网友
时间:2023-10-17 13:14
用第一种简单的就没有了