Debug Google Maps API stack overflow in iOS Safari
I have a site at localgp.com that uses Google Maps API v3 on the search results page. (Follow one of the locat开发者_开发问答ion 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?
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!
精彩评论