Google maps 使用谷歌地图的混合内容
我在我的网站上使用gmaps显示地图 我的代码Google maps 使用谷歌地图的混合内容,google-maps,https,zk,mixed-content,Google Maps,Https,Zk,Mixed Content,我在我的网站上使用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%" he
<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>
发件人:
您可以尝试添加协议属性吗?我解决了我的问题,remplace
zk.GoogleapKey=*****key***
forhttps://maps.googleapis.com/maps/api/js?key=****键***
问题是这个标签zk.googleAPIkey
,因为您的值是http://maps.googleapis.com/maps/api/js?
问题在于http
之前
<script type="text/javascript" content="zk.googleAPIkey='***MyKey***'" />
之后
<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?key=***key***" />
添加了以下内容并解决了我的问题
<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests"/>
在head中您是否尝试过使用
/
设置Google脚本?您能提供反馈吗?
<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?key=***key***" />
<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests"/>