Web
最简单方法,将logo的css样式改为display:none即可
<!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <title>移除百度地图LOGO和版权信息</title> <script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=123456789"></script> <script> //地图加载 var initialize = function() { var map = new BMap.Map('map'); mp.centerAndZoom("北京", 11); } window.onload = initialize; </script> <style type="text/css"> body, html, #allmap { width: 100%; height: 100%; overflow: hidden; margin: 0; font-family: "微软雅黑"; } /*通过CSS样式隐藏Logo*/ .anchorBL { /*头部样式*/ display: none; } </style> </head> <body> <div id="allmap"> </div> </body> </html>
Android
// 隐藏logo View child = mMapView.getChildAt(1); if (child != null && (child instanceof ImageView || child instanceof ZoomControls)){ child.setVisibility(View.INVISIBLE); }