Google Maps Not Working in IE
-
I have been trying to get a map using Google Maps API to work. It works fine in Firefox, but does not display at all in Internet Explorer 6 or 7. Here is a link to the page: http://www.mngin.org/university-of-st-thomas-maps/
The code that I am using is literally copied from Google’s site, so I am pretty confident that the code is not the issue. Here it is anyway:
<script src="http://maps.google.com/maps?file=api&v=2&key=ABQIAAAAB-iiS_acdrMOD3I21c2EuRTYIe7mCNX-9iZf2vUKjvpKKvs2SRSaiLkRayHKMbKndE40WfXTDHOGsA" type="text/javascript"></script>
<script type="text/javascript">
//<![CDATA[
function load() {
if (GBrowserIsCompatible()) {
var map = new GMap2(document.getElementById("map"));
map.addControl(new GSmallMapControl());
map.addControl(new GMapTypeControl());
map.setCenter(new GLatLng(44.94156, -93.1898), 12);
// Our info window content
var infoTabs = [
new GInfoWindowTab("UST", "The University of St. Thomas"),
new GInfoWindowTab("Address", "2115 Summit Avenue, Saint Paul, MN 55105")
];
// Place a marker in the center of the map and open the info window
// automatically
var marker = new GMarker(map.getCenter());
GEvent.addListener(marker, "click", function() {
marker.openInfoWindowTabsHtml(infoTabs);
});
map.addOverlay(marker);
marker.openInfoWindowTabsHtml(infoTabs);
}
}
//]]>
</script>
I have this code in my header.php file and then in the page where I want the map I have:
<body onload="load()" onunload="GUnload()">
<div id="map" style="width: 425px; height: 400px"></div>
</body>
The topic ‘Google Maps Not Working in IE’ is closed to new replies.