Google Maps: Simple app not working on IE
Posted
by Peter Bridger
on Stack Overflow
See other posts from Stack Overflow
or by Peter Bridger
Published on 2010-04-28T11:49:17Z
Indexed on
2010/04/28
11:53 UTC
Read the original article
Hit count: 249
We have a simple Google Maps traffic application up at: http://www.avonandsomerset.police.uk/newsroom/traffic/
For some reason it's recently stopped working in IE correctly. At this point in time it was using V2 of the API, so I've just upgraded it to use V3 - but it still won't work in IE.
It works fine in Chrome & Firefox. But in all versions of IE I've tired (6,7,8) the Google Map doesn't load fully.
The problem
The Google Map DIV will generally load all the controls (Zoom, Powered by Google, map types) but the actual map tiles do not appear in IE. I can just see the grey background of the DIV>
What I've tried
I've commented down the JavaScript code to just the following on the page, but it still has the same problem:
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>
<script type="text/javascript" >
var map;
$(document).ready(function () {
initialize(); // Set-up Google map
});
function initialize() {
var options = {
zoom: 9,
center: new google.maps.LatLng(51.335759, -2.870178),
mapTypeId: google.maps.MapTypeId.ROADMAP
};
map = new google.maps.Map(document.getElementById("googleMap"), options);
}
</script>
© Stack Overflow or respective owner