mapbox/mapbox-gl-js — pull request #811 by danzel (2014-11-05 21:25:26+00:00)
Title: IE11

Finally I've made this PR.

Everything in here is a hack, and you can't build mapbox-gl-js on windows currently, so I can't test this to work on it.

@jfirebaugh has some good suggestions on fixing these hacks over here, I've included them below.
https://github.com/mapbox/mapbox-gl-js/pull/808#issuecomment-61739889

**buffer.js DataView**
IE11 doesn't let you pass a DataView to gl.bufferData.
@jfirebaugh suggests we could just set the length on the this.array. (Will need to check if the array is even a different size? or if it is used in other places)

Otherwise this probably needs browser detection, not sure if this can be feature detected.

**draw_fill.js gl.lineWidth**
Calling gl.lineWidth raises a warning on IE11, it is [not supported.](http://msdn.microsoft.com/en-us/library/ie/dn455128(v=vs.85).aspx)
It is also not supported on any other browser on windows, but they blindly ignore it (Chrome, firefox)
Test: http://alteredqualia.com/tmp/webgl-linewidth-test/
https://code.google.com/p/angleproject/issues/detail?id=119
https://code.google.com/p/angleproject/issues/detail?id=334
Can we reconsider its usage or is it really required here? I assume it won't render correctly in highdpi on windows.

If required, we could feature detect if it can be set by testing [```gl.getParameter(gl.ALIASED_LINE_WIDTH_RANGE)```](https://github.com/AnalyticalGraphicsInc/webglreport/blob/master/webglreport.js#L245)

**postMessage**
IE11 doesn't support passing an array as the second argument. Apparently it supports a single argument, but I haven't been able to make it work.
https://developer.mozilla.org/en-US/docs/Web/API/Worker.postMessage
https://connect.microsoft.com/IE/feedback/details/783468/ie10-window-postmessage-throws-datacloneerror-for-transferrable-arraybuffers

This probably needs browser detection, not sure if this can be feature detected.