Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/google-maps/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Google maps 使用谷歌地图的混合内容_Google Maps_Https_Zk_Mixed Content - Fatal编程技术网

Google maps 使用谷歌地图的混合内容

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

我在我的网站上使用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>
发件人:



您可以尝试添加协议属性吗?

我解决了我的问题,remplace
zk.GoogleapKey=*****key***
for
https://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"/>