javascript - HereMaps JS api失败
问题描述
尝试使用 HereMap API 时出现错误
此行失败:
new H.service.Platform({ apiKey: MY-KEY })
以下是相关的堆栈:
mapsjs-core.js:130 Uncaught TypeError: a.jj is not a function
at new Rg (mapsjs-core.js:130)
at eval (eval at <anonymous> (mapsjs-core.js:71), <anonymous>:102:126)
at Object.eval (mapsjs-core.js:71)
at mapsjs-service.js:7
Uncaught InvalidArgumentError: H.geo.Point (Argument #0 undefined)
at new D (https://js.api.here.com/v3/3.1/mapsjs-core.js:43:977)
at Rf (https://js.api.here.com/v3/3.1/mapsjs-core.js:85:714)
at new Wf (https://js.api.here.com/v3/3.1/mapsjs-core.js:86:74)
at Yf (https://js.api.here.com/v3/3.1/mapsjs-core.js:90:49)
at Th.sg (https://js.api.here.com/v3/3.1/mapsjs-core.js:173:573)
at new Th (https://js.api.here.com/v3/3.1/mapsjs-core.js:173:454)
at eval (eval at <anonymous> (https://js.api.here.com/v3/3.1/mapsjs-core.js:71:36), <anonymous>:78:515)
at Object.eval (https://js.api.here.com/v3/3.1/mapsjs-core.js:71:36)
at https://js.api.here.com/v3/3.1/mapsjs-ui.js:7:8
VM360:44 Uncaught TypeError: Un is not a function
at X.Kk (eval at <anonymous> (mapsjs-core.js:71), <anonymous>:44:734)
at new X (eval at <anonymous> (mapsjs-core.js:71), <anonymous>:44:474)
at getPlatform (here-map-wrapper.js:9)
看起来演示站点上现在也发生了同样的错误:
https://developer.here.com/documentation/examples/maps-js/maps/map-at-specified-location
我们可以订阅更新的选项或方式有什么解决方法吗?
更新
看起来问题略有改变
Uncaught TypeError: this.a.Bb is not a function
at new cp (eval at <anonymous> (mapsjs-core.js:71), <anonymous>:21:767)
at Module.createHereMapInstance (here-map-wrapper.js:42)
失败的代码行现在是:
const behavior = new H.mapevents.Behavior(new H.mapevents.MapEvents(map));
解决方案
我有用户报告同样的事情(错误中的字母不同,但错误类型相同)。1 个在 FireFox 上,1 个在 Chrome 上,都是昨天或今天才开始的。但我们没有改变我们的网站。
不过,在我个人的 chrome 和 firefox 上,此错误不会显示。也不是我的其他开发人员计算机。但我今天有多个客户遇到这个问题。
我试图追踪它,它似乎特别触发了这行 JS: var behavior = new H.mapevents.Behavior(new H.mapevents.MapEvents(map));
推荐阅读
- javascript - 如何在并行模式下控制测试分组
- c++ - 当我包含一个标准库时,CMake 会创建巨大的二进制文件
- docker - Docker 上 Kibana 的 NginX 反向代理
- visual-studio - VC++ 项目 64 位迁移问题:链接器错误
- javascript - 显示正确表单 PHP 公司用户/私人用户的问题
- python - /api/login 'user' 处的 KeyError
- reactjs - Mobx React - CreateViewModel - 错误 - 对象不是函数
- mysql - 使用多个连接表对 MySQL 查询进行排序
- powershell - 从 PowerShell 中的 New-WebServiceProxy 捕获错误
- graphql - GatsbyJS 和 Netlfiy 字符串与降价中的数字