Webjavascript
最簡單方法,將logo的css樣式改成display:none便可css
<!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>
Androidhtml
// 隱藏logo View child = mMapView.getChildAt(1); if (child != null && (child instanceof ImageView || child instanceof ZoomControls)){ child.setVisibility(View.INVISIBLE); }