Can't drag on ArcgisMap with IE 11 and Angular 4
Asked Answered
A

1

6

I have this simple code pen with Angular 4 and arcgis map, but I can't drag in IE 11. Others browsers works as usual. I cannot upgrade nor downgrade the JS library of arcgis, because it depends on other widgets that we're using.

https://codepen.io/rbuenon/pen/NXNOww

<link rel="stylesheet" href="https://js.arcgis.com/3.23/esri/css/esri.css">
<script src="https://js.arcgis.com/3.23/"></script>
<script>
require(["esri/map", "dojo/domReady!"], function (Map) {
  window.map = new Map("map", {
    center: [-118, 34.5],
    zoom: 8,
    basemap: "topo"
  });
});
</script>
<div id="map"></div>    
<app-root></app-root>

Update:

polyfill.ts

import 'core-js/es6/symbol';
import 'core-js/es6/object';
import 'core-js/es6/function';
import 'core-js/es6/parse-int';
import 'core-js/es6/parse-float';
import 'core-js/es6/number';
import 'core-js/es6/math';
import 'core-js/es6/string';
import 'core-js/es6/date';
import 'core-js/es6/array';
import 'core-js/es6/regexp';
import 'core-js/es6/map';
import 'core-js/es6/weak-map';
import 'core-js/es6/set';
import 'core-js/es6/reflect';
import 'core-js/es7/reflect';
import 'zone.js/dist/zone'; 
import 'classlist.js';  
import 'web-animations-js';
import 'intl';
import 'intl/locale-data/jsonp/en';

Does anyone know how can I fix this?

Amesace answered 20/12, 2017 at 15:28 Comment(5)
Have you included the polyfills required?Rugging
Codepen included this one s3-us-west-2.amazonaws.com/s.cdpn.io/123941/polyfills.bundle.jsAmesace
If you're using Angular CLI there is a file called polyfills.ts. There are quite a few polyfills needed for ie11 to work with Angular.Rugging
@Z.Bagley I updated my question with all the imports on my polyfill.tsAmesace
I'd try the animation polyfillRugging
T
1

IE11 uses touch-events, which is not caught by arcgis. Use this polyfill to make it work: https://github.com/WebReflection/ie-touch/blob/master/ie-touch.js

Other than that you are using it in an Angular app, Angular is not really relevant to your problem.

Tasse answered 26/12, 2017 at 21:2 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.