Select to view content in your preferred language

IE10 issue with graphics draw of Polygon and Polyline

569
2
05-14-2013 01:50 PM
DougCollins
Regular Contributor
Version 3.4 of the JS API now says that IE 10 is a supported browser, but if you try the sample for the toolbar draw you will notice strange behavior with the Polygon and Polyline tools.  The line does not draw on the start of a point click, but draws after you click on the second point.  This sample is at:  http://developers.arcgis.com/en/javascript/samples/toolbar_draw/

Thanks,
Charlie
0 Kudos
2 Replies
ShreyasVakil
Frequent Contributor
Hi Charlie,

You are right, this is a know issue and a NIM (bug) has been submitted for the same (NIM091414). Unfortunately, there is no workaround currently documented but I believe it should be fixed soon.

Thanks,
Shreyas
0 Kudos
IrinaSergeeva
New Contributor
Version 3.4 of the JS API now says that IE 10 is a supported browser, but if you try the sample for the toolbar draw you will notice strange behavior with the Polygon and Polyline tools.  The line does not draw on the start of a point click, but draws after you click on the second point.  This sample is at:  http://developers.arcgis.com/en/javascript/samples/toolbar_draw/


You are right, this is a know issue and a NIM (bug) has been submitted for the same (NIM091414). Unfortunately, there is no workaround currently documented but I believe it should be fixed soon.


I've thought out several workarounds 🙂 Actually, they are ugly, but I do not think there are beautiful work arounds:)
1. If you do not need IE10 new functionality including touch, you could use meta tag
<meta http-equiv="X-UA-Compatible" content="IE=7, IE=9"> or similar,
but not: <meta http-equiv="X-UA-Compatible" content="IE=edge"> or with IE10 listed.

2. If you need touch functionality in IE10 and you use some server technology in your site (asp.net, php or etc.), you can process UserAgent string on your server site and render the necessary meta tag. So, if it is touch device, render with IE10 support, if not - without.

3. I've written simple prototype code that improves mouse behavior (I use jQuery). I believe that the problem with mouse move because of bug in MSPointer implementations:
 if (navigator.msMaxTouchPoints == 0) { // if ie10 and it is not touch screen
        $(map.__container).bind('MSPointerMove', function (evt) { // catch IE10 "mouse move"
            if (map.onMouseMove) { // if there are some listeners for mouse move
                evt.originalEvent.mapPoint = map.toMap({ x: evt.originalEvent.x, y: evt.originalEvent.y });
                evt.originalEvent.screenPoint = new esri.geometry.Point(evt.originalEvent.x, evt.originalEvent.y, map.spatialReference);
                map.onMouseMove(evt.originalEvent); //call mouse move with added previously params
            }
        });
}

Or smth like that 🙂
0 Kudos