Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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?

like image 635
raven Avatar asked Dec 20 '17 15:12

raven


1 Answers

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.

like image 196
jornare Avatar answered Sep 30 '22 06:09

jornare