【发布时间】:2017-04-29 03:38:03
【问题描述】:
我在我的网站上使用 gmaps 显示地图。
我的代码
<div class="col-md-12" >
<script type="text/javascript" content="zk.googleAPIkey='***MyKey***'" />
<gmaps id="gmaps" zoom="${initialZoom}" lat="${initialLatitude}" lng="${initialLongitude}" width="100%" height="350px" showSmallCtrl="false" >
<gmarker id="marker" content="" visible="${false}" />
</gmaps>
</div>
在我的本地服务器上工作正常,但在我的生产服务器中使用 https 不工作,我有这个错误:
例外
zk.wpd:20 Mixed Content: The page at 'https://www.domain.com/' was loaded over HTTPS, but requested an insecure script 'http://www.google.com/jsapi?key=***MyKey***'. This request has been blocked; the content must be served over HTTPS.loadScript @ zk.wpd:20
【问题讨论】:
-
你试过用
//设置谷歌脚本吗?
标签: google-maps https zk mixed-content