JS中引用百度地图并将百度地图的logo和信息去掉_技术学院_宜昌市隼壹珍商贸有限公司

您好,欢迎访问宜昌市隼壹珍商贸有限公司

400 890 5375
当前位置: 主页 > 新闻动态 > 技术学院

JS中引用百度地图并将百度地图的logo和信息去掉

发布时间:2026-01-17  |  点击率:
采用CSS覆盖的方法就可以了,但是官方是不允许这么做的,参考:http://developer.baidu.com/map/question.htm
复制代码 代码如下:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>javascript移除百度地图LOGO和版权信息</title>
<script type="text/javascript" src="//jquery.js"></script>
<script src="http://api.map.baidu.com/api?v=1.3" type="text/javascript"></script>
<script type="text/javascript">
function initialize() {
var mp = new BMap.Map('map');
mp.centerAndZoom(new BMap.Point(121.491, 31.233), 11);
}
window.onload = initialize;
</script>=
<style type="text/css">
.anchorBL{
display:none;
}
</style>

</head>
<body>
<input type="button" onclick="$('#map div.anchorBL').hide();" value="移除地图LOGO和版权说明"/>
<div id="map" style="width:400px;height:40px"></div>
</body>
</html>

全国统一服务电话

400 890 5375

电子邮箱:879577@qq.com

公司地址:宜昌市西陵区黄河路5号三峡明珠10栋1051室

咨询微信

TEL:13680874598