码迷,mamicode.com
首页 > 移动开发 > 详细

android 百度最新地图sdk包怎么去除 放大缩小按钮

时间:2015-09-21 11:53:18      阅读:209      评论:0      收藏:0      [点我收藏+]

标签:

// 隐藏缩放控件

 

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

 

android 百度最新地图sdk包怎么去除 放大缩小按钮

标签:

原文地址:http://www.cnblogs.com/zhujiabin/p/4825361.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!