编辑器地图组件采用https引入

This commit is contained in:
devil 2020-02-16 19:28:05 +08:00
parent 9828615776
commit 9000cd1b8b
2 changed files with 3 additions and 3 deletions

View File

@ -4,7 +4,7 @@
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<script type="text/javascript" src="../internal.js"></script>
<script type="text/javascript" src="https://api.map.baidu.com/api?v=1.1&services=true"></script>
<script type="text/javascript" src="https://api.map.baidu.com/api?v=2.0&services=true"></script>
<style type="text/css">
.content{width:530px; height: 350px;margin: 10px auto;}
.content table{width: 100%}
@ -156,7 +156,7 @@
'&markerStyles=' + 'l,A'].join('');
editor.execCommand('inserthtml', '<iframe class="ueditor_baidumap" src="' + url + '"' + (styleStr ? ' style="' + styleStr + '"' :'') + ' frameborder="0" width="' + (mapWidth+4) + '" height="' + (mapHeight+4) + '"></iframe>');
} else {
var url = "http://api.map.baidu.com/staticimage?center=" + center.lng + ',' + center.lat +
var url = "https://api.map.baidu.com/staticimage?center=" + center.lng + ',' + center.lat +
"&zoom=" + zoom + "&width=" + size.width + '&height=' + size.height + "&markers=" + point.lng + ',' + point.lat;
editor.execCommand('inserthtml', '<img width="'+ size.width +'"height="'+ size.height +'" src="' + url + '"' + (styleStr ? ' style="' + styleStr + '"' :'') + '/>');
}

View File

@ -14,7 +14,7 @@
overflow: hidden;
}
</style>
<script type="text/javascript" src="https://api.map.baidu.com/api?key=&v=1.1&services=true"></script>
<script type="text/javascript" src="https://api.map.baidu.com/api?key=&v=2.0&services=true"></script>
</head>
<body onload="initMap();">