-1

I'm completely new to writing code, but have managed to get a Google map to display the markers in the manor I want. This works fine using my locally hosted IIS with VS 2013 and IE11. I then published the page to my IIS7.5 server and all it does in IE11 is show a grey background. The page works fine in Chrome hosted on the same server? I've since created simpler test pages which again work fine in Chrome, but not IE? Here's the code from the simple page (thanks to who ever I copied it from).

Many thanks in advance

Matt

<html>
<head>
    <title></title>
    <meta name="ROBOTS" content="NOINDEX, NOFOLLOW">
    <script src="http://maps.google.com/maps/api/js?sensor=false" type="text/javascript"></script>     
    <script type="text/javascript">
        function load() {
            var mapDiv = document.getElementById("map");
            var latlng = new google.maps.LatLng(-34.397, 150.644);
            var mapOptions =
            {
                zoom: 8,
                center: latlng,
                mapTypeId: google.maps.MapTypeId.ROADMAP,
            };
            var map = new google.maps.Map(mapDiv, mapOptions);
           }
    </script>
</head>
<body onload="load()">
    <div id="map" style="width: 800px; height: 400px;">&nbsp;</div>
</body>
</html>
Matt Doran
  • 11
  • 3

2 Answers2

1

Seem to have sorted it. Looks like a bug in Google maps v3.19 API? Found a link to this error https://code.google.com/p/gmaps-api-issues/issues/detail?id=7675. Fixed it by forcing it to use v3.18 as in the answer found here https://stackoverflow.com/a/28613097/4580633.

Thanks to all those involved.

Matt

Community
  • 1
  • 1
Matt Doran
  • 11
  • 3
0

The force to v3.18 didn't work for me, but another suggestion on the code.google.com site did: force compatibility to IE=Edge, and it works:

<meta http-equiv="X-UA-Compatible" content="IE=edge" />
actorma
  • 28
  • 4