I ran across a little problem today where an application written for our website, and running the Google Maps API was 'causing the browser to crash, but as always with 'quirks'...  only in IE6!

After some time fiddling around on the internet and reading quite a few interesting articles about the stability of the Google Maps API within IE6 I found a few things listed as the most common causes : (http://www.easypagez.com/maps/ieworking.html)

  • Script position. Make sure the Google Maps API script is called in either the head of your HTML or at the very end. Embedding within HTML should be avoided.
  • Make sure a valid doctype is declared. Remember the xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml" attributes need to be added if you are presenting polylines in mapping applications
  • Ensure you have set a size for your google_map DIV
  • In your javascript make sure that the variable you assign new GMap2(); to is unique. Commonly it is assigned as var map = new GMap2(); make sure that variable is unique.
  • Good practice is to ensure your document W3C validates. http://validator.w3.org/ Clean (X)HTML is a great place to start.

Other things to be aware of. In the script src tag Google passes the major script version into the query string. http://maps.google.com/maps?file=api&v=2 BUT... this can be, although not recommended, also be used to pass in minor version stamps too. i.e. http://maps.google.com/maps?file=api&v=2.117

For a list of API Version Changes refer to this Google page. http://groups-beta.google.com/group/Google-Maps-API/web/api-version-changes