javascript - Google Maps Uncaught TypeError: b.has is not a function
问题描述
We are including the Google Maps API V3 in our internal systems with the below code:
script src="https://maps.googleapis.com/maps/api/js?key=&libraries=places,geometry"
This was working until a few hours ago (9am AEST) now in the console all that's returned is:
Uncaught TypeError: b.has is not a function from https://maps.googleapis.com/maps-api-v3/api/js/35/3/map.js
Is anyone else facing the same problem?
How can I fix it when the code is included from Google's servers?
解决方案
Had the same problem, using an older version fixed it for now:
https://maps.googleapis.com/maps/api/js?v=quarterly&key=API_KEY
Long time fix - You probably overwrote the native window.Map, see https://developer.mozilla.org/de/docs/Web/JavaScript/Reference/Global_Objects/Map
推荐阅读
- javascript - 如何在常规 html 文件中使用模块化 js 文件(带有“导出”)?
- php - Xampp 网络连接
- r - 为 RStudio 中的每个参与者创建每个参与者 ID 的列表,其中包含 3 个数据框
- java - 在第一次扫描时使用scanner.nextLine 时,扫描仪会跳到第二次扫描
- javascript - 列出 DFS 中所有可能的循环
- c - 字符串长度未正确显示
- assembly - 如何在 NASM 中为 x86 程序集上的 `ADD r/m16, imm16` 生成匹配 `81 /0 iw` 的输出?
- postgresql - 有没有办法将 csv 视为表来匹配键并将数据导入到 postgres 中的适当行?
- python - 如何创建服务或 shell 脚本以在 virtualenv 中运行项目?
- javascript - 暗模式/亮模式 - html,css