Internet Explorer likes to throw the “Operation Aborted” error when trying to hook into the Google Maps API via JavaScript, at least when the JavaScript is placed where it is supposed to, i.e., a reference to the Google Maps JavaScript in the page HEAD and the actual rendering of the map within the DIV tag.

To fix this in IE, move the DIV block JavaScript code near the bottom of your HTML. Place it right between the terminating BODY tag and the terminating HTML tag. The problem seems to be that IE gets all confused when JavaScript attempts to make modifications to the page – e.g., sucking down a map from Google – while still rendering the body HTML. There are a couple other fix options here:

It is worth noting that this “fix” does not break functionality in Firefox. And, really, who cares about the other browsers? Communists and robots, my friend.

In the HEAD of your page, you may include the initial JavaScript

<script src="" mce_src="" type="text/javascript"></script> 

Though it surprised me that I couldn’t remove the terminating SCRIPT tag and instead make the first SCRIPT tag self-terminating, i.e., instead of <script foo="bar"></script>, I tried <script foo="bar"/> and it didn’t work.

The JavaScript that actually renders the map within the DIV tag, cleverly named “map”, should look similar to the following:

</BODY> <script type="text/javascript"> //<![CDATA[  var map = new GMap(document.getElementById("map")); map.setMapType(G_HYBRID_TYPE); map.addControl(new GSmallMapControl()); map.addControl(new GMapTypeControl()); map.centerAndZoom(new GPoint(-666.666,66.6666), 2); map.openInfoWindowHtml(map.getCenterLatLng(), "100 Main St.<BR>Nowheresville, ZZ 99999 ZZZ"); //]]> </script> </HTML>