ric*_*gas 7 javascript grails here-api
如何通过HTTPS调用HERE地图?
我在我的服务器上使用HTTPS所以当我这样称呼时:
<script src="http://js.api.here.com/v3/3.0/mapsjs-core.js" type="text/javascript" charset="utf-8"></script>
<script src="http://js.api.here.com/v3/3.0/mapsjs-service.js" type="text/javascript" charset="utf-8"></script>
Run Code Online (Sandbox Code Playgroud)
浏览器因"混合内容"而阻止请求,因此没有显示地图......
我试图在脚本源上将"http"更改为"https"但我得到同样的问题,因为两个javascripts在其代码中都有"http"调用.
顺便说一句,后端是用Grails编写的,并且使用Spring Security Core插件保护通道.
非常感谢您的帮助!
感谢致敬!
HER*_*ort 17
您需要从https加载API,此外还需要设置:
// Create a platform object to communicate with the HERE REST APIs
var platform = new H.service.Platform({
useCIT: true,
app_id: app_id,
app_code: app_code,
useHTTPS: true
});
Run Code Online (Sandbox Code Playgroud)
Trick是useHTTPS:true,如以下文档中所述:HERE开发人员指南
| 归档时间: |
|
| 查看次数: |
3601 次 |
| 最近记录: |