IE8 and loading basemap issue

866
6
Jump to solution
07-31-2013 11:06 AM
MatthewLofgren
Occasional Contributor
In IE 8 (tried windows xp true IE 8 and windows 7 (IE9) IE8 browser/document mode)
About 1 out of every 20 page loads the base map doesn't load and the application stops.
I've cut my code down to just loading the basemap:
Also tried multiple doc types as well as removing the meta tags below.
Seems to be fine on all other browsers. Unfortunately IE8 is still important for us.

<!DOCTYPE html> <html> <head>         <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />     <meta http-equiv="X-UA-Compatible" content="IE=7, IE=9, IE=10" />     <meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no" />         <link rel="stylesheet" href="http://serverapi.arcgisonline.com/jsapi/arcgis/3.5/js/dojo/dijit/themes/tundra/tundra.css" />     <link rel="stylesheet" href="http://serverapi.arcgisonline.com/jsapi/arcgis/3.5/js/esri/css/esri.css" />         <script type="text/javascript" src="http://serverapi.arcgisonline.com/jsapi/arcgis/3.5" ></script>     <script type="text/javascript" >   var map;   require([    "esri/map",     "dojo/ready"    ], function (Map, ready) {    ready(function () {         initMap();      });        function initMap() {       map = new Map("mapPane", {        extent: new esri.geometry.Extent({"xmin":-11727455,"ymin":4861652,"xmax":-11706340,"ymax":4871512,"spatialReference":{"wkid":3857}}),      basemap: "streets"     });      }   });    </script>  </head> <body class="tundra" style="background-color: White;">        <div id="mapPane" >                 </div>  </body> </html>


Also, before I stripped down my code, I had an error handler for the basemap and it would return
"Code undefined : Unexpected call to method or property access." but no file or line #.
Anyone have a clue?

Thanks!
0 Kudos
1 Solution

Accepted Solutions
BhavdeepSachdev
New Contributor II
Not sure if its the same problem but I had issues with IE8 and TOC not loading. I delayed the startup for the TOC by half a second and it's been working great ever since.
setTimeout(function () {         CreateAndDrawTOC();     }, 500);

View solution in original post

0 Kudos
6 Replies
BhavdeepSachdev
New Contributor II
Not sure if its the same problem but I had issues with IE8 and TOC not loading. I delayed the startup for the TOC by half a second and it's been working great ever since.
setTimeout(function () {         CreateAndDrawTOC();     }, 500);
0 Kudos
JeffJacobson
Occasional Contributor III
Do you get the same problem with this page? (View source here.)
0 Kudos
BenFousek
Occasional Contributor III

Also, before I stripped down my code, I had an error handler for the basemap and it would return
"Code undefined : Unexpected call to method or property access." but no file or line #.


Not sure why this is, but sometimes I get errors in Firebug that don't have additional info or the stack.  Generally when this happens I can use Developer Tools in Chrome to get more info.
0 Kudos
MatthewLofgren
Occasional Contributor
Do you get the same problem with this page? (View source here.)


Yep. Took a bit longer. ~30 refreshes but same result.

Attached image (notice the esri logo comes back).
[ATTACH=CONFIG]26379[/ATTACH]
0 Kudos
MatthewLofgren
Occasional Contributor
Also, happens here http://developers.arcgis.com/en/javascript/samples/map_infowindow/

Takes a few refreshes to see it.

This doesn't happen in 3.0 but I'd like to upgrade to use some new features.
0 Kudos
MatthewLofgren
Occasional Contributor
Wrapping the initMap() function with the minimum setTimeout delay of 4ms did seem to work.

setTimeout(function () {   
      initMap();
     }, 4);


ready function firing too quickly for ie8?

Thanks everyone.
0 Kudos