Strange error in IE when using GPolyline
Posted on March 26, 2007 - Filed Under Google Maps, JavaScript
When using GPolyline in application based on Google Maps API and application in Internet Explorer fails with strange errors deep in API, You can recover by sticking to following procedure:
- be sure that application fails when adding GPolyline to map –
map.addOverlay(new GPolyline(points)) - spend a lot of time digging in Your code, even try to understand cryptic, auto-generated GM API code
- leave problem for a few days or even weeks
- return to issue
- read Google Maps API reference
- add VML namespace and CSS definitions
- proceed with coding
Or You can skip points starting from 2 to 5 (optionally). But all hardcore wannabe JavaScript developers (like me!) have to go go through all points ;-)))
Drat and double drat. When I was really novice with Google Maps API I have used API reference more often, with good results ;-)
So, when this happen to You remember to add proper definitions.
Popularity: 4% [?]
Hits for this post: 3708
Similar Posts
- Google Maps API as debugger tool
- Time to go dynamic
- Generating data for AJAX req in Rails on the fly
- Ruby on Rails pocket reference
- Google Maps scale – cheat sheet
Comments
2 Responses to “Strange error in IE when using GPolyline”
Leave a Reply



Thanks for posting that! I was stuck at step 4 until I find this :)
Thanks dude for the useful post. I dint added VML namespace and CSS definitions on my page so it was not working. But now everything is fine.
Thanks
Tarandeep