Google Maps Error – Solved!


For some time I’ve been struggling with a problem with my Google Maps API – an error that will sometimes appear in Internet Explorer.

Anyway, I did some research yesterday and found a number of possible solutions. They all revolve around the idea that IE doesn’t like you displaying the map until the page has completed.

The three solutions I found were…

  1. Load the map script using an onload event
  2. Use the setTimeout javascript function to delay the execution of the code
  3. Move the javascript to the end of the HTML

I used the third one and it now appears to have cured the problem. Hoorah!

Posted by David Artiss

Enterprise Happiness Engineer for the WordPress VIP team at Automattic. Gamer, film lover and general fan of all things Marvel, Star Trek and Star Wars. Failed comedian. Writer for The Big Tech Question. World's Greatest Grandma.

Talk to me!

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