javascript - maps.googleapis.com 与 date.js 不兼容
问题描述
最近遇到一个长期存在的asp.net c#程序的问题。
在我的 default.aspx 中,我们有...
<script src="https://maps.googleapis.com/maps/api/js?key=...&libraries=geometry"></script>
<script src="/js/date.js" type="text/javascript"></script>
date.js 是来自http://www.datejs.com/的实用程序库
就在最近(过去 6 周),我们的地图没有绘制任何东西,经过一番调查,似乎有一个toString()
地图库文件试图使用toString()
date.js 文件中的一个并且失败得很惨。
Uncaught TypeError: format.replace is not a function
at Date.toString (date.js:40)
at iq (common.js:65)
at Object._.Bq (common.js:75)
at map.js:83
目前我可以指定谷歌地图的版本,3.40 可以正常工作,以后的任何东西都不能。
有没有人对此有解决方案或有人看到过这个问题?授予 date.js 现在是非常古老的库,但我想知道是否有什么我可以做的。
解决方案
谷歌建议指向更新版本的 date.js https://github.com/datejs/Datejs/issues/88
我还没有检查它,但确认它使用旧的 date.js 失败
推荐阅读
- reactjs - 通过 refs 访问 phone-react-input-2 组件时,我没有得到更新的状态
- office-js - Outlook 插件 - 需要获取打开/读取 UI 的电子邮件数据
- c++ - cpp 程序在读取 csv 文件时返回核心转储
- r - 在 RMarkdown 块中渲染闪亮
- typescript - 带有动态键的 TypeScript 对象惰性初始化
- python - 使用 pyodbc 连接到 IBM i 的 Db2 时出现问题
- html - Shopify 如何将锚点更改为没有前缀
- microsoft-edge-chromium - Edge Chromium IEMode SiteList 允许重定向选项不起作用
- java - 使用蓝牙打印机在 Android Studio 上打印条码
- javascript - 到 innerHTML 的 API 数据导致未定义