ArcGIS JavaScript Support IE11

4966
4
05-12-2016 01:33 PM
YiQi2
by
New Contributor


Hello:

I developed an application based on ArcGIS Server 10.3.1 and JavaScript 3.16. The application works well in Chrome and Firefox, but it doesn't work in IE11. I wonder if I miss anything in the code. Can anyone give me some insights? I have read discussion on CORS and proxy pages, but those seem not an issue for the new version.

Below is my HTML file:

<!DOCTYPE html>

<html>

  <head>

    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>

    <meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no"/>

    <title>S4 ArcGIS Map Web App Template</title>

    <link rel="stylesheet" href="http://js.arcgis.com/3.16/dijit/themes/nihilo/nihilo.css"/>

    <link rel="stylesheet" href="http://js.arcgis.com/3.16/esri/css/esri.css"/>

    <link rel="stylesheet" href="css/map.css" type="text/css"/>

   

    <script src="http://js.arcgis.com/3.16/"></script>

   

    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>

    <script src="js/map.js"></script>

  </head>

  <body class="nihilo">

    <div id="bcMain" data-dojo-type="dijit/layout/BorderContainer" data-dojo-props="design:'headline', liveSplitters:'true'">

      <!-- Header -->

      <header>

        <div id="cpTitle" data-dojo-type="dijit/layout/ContentPane" data-dojo-props="region: 'top'" style="height: 60px">

          <div id="mapTitle"><h1>Map U.S.A Project</h1></div>

          <div id= "toolbar">

         <div  id="toolbt">

          <button data-dojo-type="dijit/form/Button" id="downLD"  onclick='downloadCSV({ filename: "S4DownLoadFile.csv" });'>Download CSV</button>

          <button data-dojo-type="dijit/form/Button" id="drawPoly" onclick="getdrawingState('poly');app.toolbar.activate(esri.toolbars.Draw.POLYGON);map.graphics.clear();map.infoWindow.hide()">Polygon</button>

          <button data-dojo-type="dijit/form/Button" id="singlePoly" onclick="getdrawingState('single');app.toolbar.deactivate(esri.toolbars.Draw.POLYGON);map.graphics.clear();map.infoWindow.hide()">Reset</button>

              <!--<div id="divPrint"></div>-->

          </div>

       

          <div id="divPrint"></div>

         

          </div>

         

        </div>

      </header>

      <!-- Sidebar -->

      <div id="cpLeading" data-dojo-type="dijit/layout/ContentPane" data-dojo-props="splitter:'true', region:'leading'"style="width: 380px">

          <br>

          <label for="category"></label>

          <input id="category" />

          <br>

          <br>

          <label for="layerName"></label>

          <input id="layerName" />

          <br><br>

          <div id="slider" style="margin-left: 60px">

          <ol data-dojo-type="dijit/form/HorizontalRuleLabels" container="topDecoration" style="height:1.5em;font-size:75%;color:gray;">

        <li>1940</li>

        <li>1950</li>

        <li>1960</li>

        <li>1970</li>

        <li>1980</li>

        <li>1990</li>

        <li>2000</li>

        <li>ACS</li>

        <li>2010</li>

        </ol>

         </div>

        <div id="divLegend"></div>

      <!-- <div id="divPrint"></div>-->

      </div>

      <!-- Main Content Area -->

      <div id="mapMain" data-dojo-type="dijit/layout/ContentPane" data-dojo-props="region:'center'">

        <div id="divSearch"></div>

          <div id="divBasemapClick">

          <div data-dojo-type="dijit/TitlePane" data-dojo-props="title:'Switch Basemap', closable:false, open:false">

            <div id="divBasemapContent" data-dojo-type="dijit/layout/ContentPane">

              <div id="basemapGallery"></div>

            </div>

          </div>

        </div>

       <!--<div id="BasemapToggle"></div>-->

        <div id="cpCenter" data-dojo-type="dijit/layout/ContentPane"></div>

        <div id="cpBottom" data-dojo-type="dijit/layout/ContentPane" data-dojo-props="splitter:'true', region:'bottom'">

         <!--  <div id="divGrid"></div>-->

        </div>

      </div>

    </div>

  </body>

</html>

0 Kudos
4 Replies
AlexSchafer
New Contributor II

Hello,

You may want to post the code for "js/map.js" if you can, or at least what would be applicable.  If you can describe specifically what issue you are having with IE11 it might help as well.

YiQi2
by
New Contributor

Hi Alex:

The whole application works fine in Chrome and Firefox.

But it doesn't load properly in IE11.

The js code is very long. I don't know which part is needed to help diagnosis. Below I attached the functions I used in the code.

require([

    "esri/map",

    "dojo/_base/connect",

    "esri/dijit/BasemapGallery",

    "esri/dijit/Print",

    "esri/tasks/PrintTask",

    "esri/tasks/PrintParameters",

    "esri/tasks/LegendLayer",

    "esri/tasks/PrintTemplate",

    "esri/dijit/Search",

    "esri/arcgis/utils",

    "esri/geometry/Extent",

    "esri/geometry/scaleUtils",

    "esri/geometry/Point",

    "esri/symbols/SimpleMarkerSymbol",

    "esri/symbols/SimpleFillSymbol",

    "esri/symbols/SimpleLineSymbol",

    "esri/toolbars/draw",

    "esri/graphic",

    "esri/geometry/Polygon",

    "esri/tasks/FeatureSet",

    "esri/tasks/query",

    "esri/tasks/QueryTask",

    "esri/InfoTemplate",

    "esri/tasks/IdentifyTask",

    "esri/tasks/IdentifyParameters",

    "esri/dijit/Popup",

    "esri/layers/ArcGISDynamicMapServiceLayer",

    "esri/layers/FeatureLayer",

    "esri/dijit/Legend",

    "esri/dijit/LayerList",

    "esri/dijit/Scalebar",

    "dojo/_base/Color",

    "dojo/_base/array",

    "dojo/store/Memory",

    "dojo/_base/declare",

    "dgrid/OnDemandGrid",

    "dgrid/Selection",

    "dijit/layout/BorderContainer",

    "dijit/layout/ContentPane",

    "dijit/form/ComboBox",

    "dijit/form/FilteringSelect",

    "dijit/form/HorizontalSlider",

    "dijit/form/TextBox",

    "dojo/ready", "dojo/parser", "dijit/registry", "dojo/dom", "dojo/dom-attr", "dojo/on", "dojo/query", "dijit/form/ComboBox", "dijit/form/Select",

    "dojo/_base/array", "dojo/dom-construct", "dojo/domReady!", "dijit/form/Button", "dijit/WidgetSet",

], function(

    Map, connect, BasemapGallery, Print, PrintTask, PrintParameters, LegendLayer, PrintTemplate, Search, arcgisUtils, Extent, scaleUtils, Point,

    SimpleMarkerSymbol, SimpleFillSymbol, SimpleLineSymbol,

    Draw, Graphic, Polygon, FeatureSet, Query, QueryTask,

    InfoTemplate, IdentifyTask, IdentifyParameters, Popup,

    ArcGISDynamicMapServiceLayer, FeatureLayer, Legend, LayerList, Scalebar,

    Color, array, Memory,

    declare, Grid, Selection,

    BorderContainer, ContentPane, ComboBox, FilteringSelect, HorizontalSlider, TextBox, ready, parser, registry, dom, domConstruct, domAttr, on, query, arrayUtils

) {

    ready(function() {

        // Parse DOM nodes decorated with the data-dojo-type attribute

        parser.parse();

    });

0 Kudos
AlexSchafer
New Contributor II

Yi Qui,

When you are using IE11, if you could use the Developer Tools (by using "F12" on the keyboard when the browser is active), and can go to the "Console" tab this should list out any JavaScript warnings and errors your browser is returning.  If you could post those errors, it might be possible to see what is causing the problem.

From the screenshots you provided it looks like you are running your content locally?  That may be what is causing a problem if you are using AJAX code, unless the code you are calling is hosted somewhere (on your network, or on the web).

Update: Here is something else you can try that may because of the "User-Agent" request header:

How to get your ASP.NET application working in IE11

Hopefully that helps.

0 Kudos
DavidChrest
Occasional Contributor II

In IE, check top see if your Compatibility View is checked in the Tools menu. If it is, turn it off and refresh your page. Having Compatibility View turned on (seems to be on by default most times in IE) essentially ruins web mapping apps, especially if you are using vector tiles.

0 Kudos