android 百度地图上缩放的按钮怎么放

发布网友 发布时间:2022-04-22 05:43

我来回答

1个回答

热心网友 时间:2023-09-26 03:29

// 隐藏缩放控件

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);

声明声明:本网页内容为用户发布,旨在传播知识,不代表本网认同其观点,若有侵权等问题请及时与本网联系,我们将在第一时间删除处理。E-MAIL:11247931@qq.com