2016-02-24 回答
// 隐藏缩放控件
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 = mbaidumap.getuisettings();
muisettings.setcompassenabled(true);
// 删除百度地图logo
mmapview.removeviewat(1);