?
Solved

Page loads in Firefox but not IE

Posted on 2012-08-17
8
Medium Priority
?
203 Views
Last Modified: 2014-08-14
I am using the Google Maps API to generate a map with a single KML file.  It works fine with Firefox, but displays a blank page when viewed in IE.  There are no errors displayed and this is the source that is shown in IE.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml">

<head>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
<meta charset="utf-8"/>
<title>Cumberland County LiveCAD Map</title>
<link href="css/styles.css" rel="stylesheet" type="text/css" /><script type="text/javascript" src="//maps.googleapis.com/maps/api/js?sensor=false"></script>
<script type="text/javascript">
      function initialize() {
        var latlng = new google.maps.LatLng(43.83, -70.42);
        var mapOptions = {
          center: latlng,
          zoom: 10,
          mapTypeId: google.maps.MapTypeId.TERRAIN
        }

        var map = new google.maps.Map(document.getElementById('map_canvas'), mapOptions);
            var cadLayerOptions = {
              preserveViewport: true,
          };
        var cadLayer = new google.maps.KmlLayer('<url>', cadLayerOptions);
        cadLayer.setMap(map);
            }
      </script>
</head>
<body class="background" onload="initialize()">
      <div id="map_canvas" style="width:100%; height:100%; float:left"></div>
</body>
</html>
0
Comment
Question by:jmoran18251
6 Comments
 
LVL 58

Accepted Solution

by:
Gary earned 2000 total points
ID: 38305603
That code doesnt work in FF,
You have a misplaced comma here which gives an error
preserveViewport: true,
0
 
LVL 11

Expert Comment

by:BillBondo
ID: 38305833
Maybe this http://code.google.com/p/html5shiv/ will help. My site (HTML5) doesnt work on IE8 and earlier. But works on FF
0
 
LVL 3

Expert Comment

by:srivenky
ID: 38310909
I guess there is some issue with the doc type specified.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

Open in new window


Remove the doctype from the file, the map is rendered both in IE & FF.

Also replace this code with yours (Comma removed)
 var map = new google.maps.Map(document.getElementById('map_canvas'), mapOptions);
            var cadLayerOptions = {
preserveViewport: true
          };

Open in new window

Sample.html
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 71

Expert Comment

by:Qlemo
ID: 40237389
I've requested that this question be deleted for the following reason:

Not enough information to confirm an answer.
0
 
LVL 58

Expert Comment

by:Gary
ID: 40237390
IE7 was the only browser it failed to load in and removing the comma as pointed out here
http://www.experts-exchange.com/Q_27832963.html#a38305603

...fixed that
0
 
LVL 58

Expert Comment

by:Gary
ID: 40246207
Uh?
You don't remove the Doctype.
The error was the comma and the accepted answer just repeats what I said 3 days earlier.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Shoutout to Emily Plummer (http://www.experts-exchange.com/members/eplummer26.html) for giving me this article! She did most of it, I just finished it up and posted it for her :)    Introduction In a previous article (http://www.experts-exchang…
In threads here at EE, each comment has a unique Identifier (ID). It is easy to get the full path for an ID via the right-click context menu. However, we often want to post a short link within a thread rather than the full link. This article shows a…
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
Suggested Courses
Course of the Month16 days, 2 hours left to enroll

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question