怎样将baidu地图中的baidu logo 去掉
2016-01-16 17:41
507 查看
今天我的老大问我是不是能够将baidumap 的js版中baidu logo 去掉。
我上网查询一下,有各种方法。比方将相应的logo div remove hide 等等,这些都是须要JS 函数触发运行。
可是,我还找到以下的方法,好简单採用css样式覆盖。代码例如以下:
<!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>
<div id="map" style="width:400px;height:40px"></div>
</body>
</html>
logo 是引用例如以下的anchorBL css 样式,在自己的html 将其覆盖掉就可了。
可是baidu地图官方说明是不同意这么做。參考:http://developer.baidu.com/map/question.htm。
我上网查询一下,有各种方法。比方将相应的logo div remove hide 等等,这些都是须要JS 函数触发运行。
可是,我还找到以下的方法,好简单採用css样式覆盖。代码例如以下:
<!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>
<div id="map" style="width:400px;height:40px"></div>
</body>
</html>
logo 是引用例如以下的anchorBL css 样式,在自己的html 将其覆盖掉就可了。
可是baidu地图官方说明是不同意这么做。參考:http://developer.baidu.com/map/question.htm。
相关文章推荐
- hdu1082 Matrix Chain Multiplication
- debian Jessie版安装中文输入法
- 3.6 产生式系统
- Codeforces educational round 5. E Sum of Remainders 数论 分块
- HDU 1789 Doing Homework again
- 服务器TIME_WAIT和CLOSE_WAIT详解和解决办法
- hdu2057 A + B Again
- [ILINK32 Error] Error: Unresolved external 'WSAIoctl'
- POJ 2027 No Brainer
- NSBundle 的理解和 mainBundle 类方法的详解
- set集合中的contains操作
- G面经prepare: X-Straight
- System.Net.Mail发送邮件
- Failed to execute goal on project ecz-wx: Could not resolve dependencies for project
- 【数组】Container With Most Water
- Codeforces Gym 100231F Solitaire 折半搜索
- Syntax error, annotations are only available if source level is 1.5
- vector pair sort
- 2.7 过程表示
- 2.5 框架表示