Internet Explorer(IE) NOT WORKING

Map not working in Internet Explorer(IE)

There a few conditions that IE will not tolerate or get confused with, these are the most common.

Check the following points if encountering problems with IE.

  • Script Position
  • Map Size
  • Unique Map ID
  • iepngfix
  • Error Free

Script Position

A map script inside <html> tags should be avoided, put the map script either in the head or at the very end of the body, just before the </body>. This usually solves most cases where IE is not working... also... make sure that at the top of the page on line 1, there is a valid DOCTYPE... as this is crucial for polylines, polygons and the infowindow.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "">
<html xmlns="" xmlns:v="urn:schemas-microsoft-com:vml">

Map Size

IE needs to know the size of the map ensure that it has been set:-

<div id="map_canvas" style="width:510px;height:200px;">
map = new GMap2(document.getElementById("map"),{size:new GSize(510,200)});

Unique Map ID

Some documents use the word map for other functions other than a Google Map. Check to make sure that the map id is "unique":-

var map = new GMap2(document.getElementById("map_canvas"));
<div id="map_canvas" style="width: 600px; height: 350px"></div>


Make sure that iepngfix is not applied to the map, below is an example of iepngfix code in CSS.

img, div, input { behavior: url('/media/scripts/'); }

Error Free

Make sure that your document is free of all errors. Check your document using a free online XHTML validator. HTML tags must be opened and closed properly.

... and using function load means you have to call it in your body tag:-

function load() {.........} but your <body> tag does not call it <body>
The body tag should be <body onload="load()" onunload="GUnload()">