gpt4 book ai didi

jquery - 隐藏版权 Bing map Ajax 控件 7.0

转载 作者:行者123 更新时间:2023-12-01 06:50:57 25 4
gpt4 key购买 nike

如何删除 Bing Map Ajax Control 7.0 中的版权?

enter image description here

没有任何选项可以执行此操作。我尝试通过 jQuery 从 DOM 中删除元素,但不起作用。

有什么办法可以去掉这个吗?

最佳答案

没有必要使用棘手的 CSS 提示来隐藏控件的版权,这不是推荐的方式,也不是官方的方式。为了隐藏AJAX v7.0控件上的版权,可以使用mapOption的属性上名为showCopyright的属性,参见MSDN:

http://msdn.microsoft.com/en-us/library/gg427603.aspx

重要:

Bing Maps Platform API Terms of Use requires copyright information to be displayed. Only set this option to false when copyright information is displayed through alternate means.

结合起来,您可以在 map 元素上使用copyrightchanged,以便您可以按照自己的方式跟踪和管理版权。

代码示例:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<script type="text/javascript" charset="UTF-8" src="http://ecn.dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=7.0">
</script>
<script type="text/javascript">
var map = null;

function getMap() {

map = new Microsoft.Maps.Map(
document.getElementById('myMap'),
{
credentials: 'YOURKEY',
showCopyright: false
});

Microsoft.Maps.Events.addHandler(map, 'copyrightchanged', function() {
map.getCopyrights(function(result) {
var container = document.getElementById('copyright');
container.innerHTML = result.join(' ');
});
});
}

</script>
</head>
<body onload="getMap();">
<div id="myMap" style="position: relative; width: 800px; height: 600px;">
</div>
<div id="copyright"></div>
</body>
</html>

关于jquery - 隐藏版权 Bing map Ajax 控件 7.0,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14997282/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com