在 iOS Safari 中调试 Google Maps API 堆栈溢出
我在 localgp.com 上有一个网站,该网站在搜索结果页面上使用 Google Maps API v3。 (点击首页上的位置链接之一。)问题是,在移动 safari(iPhone 和 iPad)上,API 中的某处出现 JavaScript 错误,但它在我感兴趣的所有其他浏览器上运行良好定位包括 Mac 和 PC 上的 Safari。
有问题的 JavaScript: http://maps.gstatic.com/intl /en_us/mapfiles/api-3/5/11/main.js
发生行错误: 26、28 和 27
错误消息: RangeError:超出最大调用堆栈大小。
我的问题:
- 短期内,有人知道这里发生了什么以及如何解决吗?
- 从长远来看,如果可能的话,我将如何调试移动 Safari 上的 javascript 错误?
I have a site at localgp.com that uses Google Maps API v3 on the search results page. (Follow one of the location links on the front page.) The problem is, on mobile safari (both iPhone and iPad), a javascript error occurs somewhere within the API, but it works just fine on all other browsers I'm interested in targetting including Safari on Mac and PC.
The offending javascript:
http://maps.gstatic.com/intl/en_us/mapfiles/api-3/5/11/main.js
Lines error occurs:
26, 28 and 27
Error message:
RangeError: Maximum call stack size exceeded.
My questions:
- In the short term, might anyone know what's going on here and how it might be solved?
- Longer term, how would I go about debugging javascript errors on mobile safari if at all possible?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
似乎如果您使用“边界”选项,就会导致此问题。
我们发现,当bounds设置为true时,谷歌代码会一遍又一遍地调用fitbound()。
我不确定边界是否会对地图产生很大影响,但它在教程中,所以它有点奇怪,以前没有发现过。
希望有帮助!
It seems that if you use the 'bounds' option it causes this problem.
We discovered that when bounds was set to true, the google code was calling fitbound() over and over.
Im not sure if bounds will have a big impact on the map but it was in the tutorial so its a bit peculiar this hasn't been spotted before.
Hope that helps!