Strange error in IE when using GPolyline

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:

  1. be sure that application fails when adding GPolyline to map – map.addOverlay(new GPolyline(points))
  2. spend a lot of time digging in Your code, even try to understand cryptic, auto-generated GM API code
  3. leave problem for a few days or even weeks
  4. return to issue
  5. read Google Maps API reference
  6. add VML namespace and CSS definitions
  7. 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.

Join the Conversation

2 Comments

  1. 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

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.