Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IE11 won't render the map. #2677

Closed
roelvanhintum opened this issue Jun 6, 2016 · 11 comments · Fixed by #2700
Closed

IE11 won't render the map. #2677

roelvanhintum opened this issue Jun 6, 2016 · 11 comments · Fixed by #2700

Comments

@roelvanhintum
Copy link

I tried running this example on IE11: https://www.mapbox.com/mapbox-gl-js/examples/
The map does not render at all. I did get something in the console:

Warning:

Not using VertexArrayObject extension.

Error, after tilting the invisible map:

SCRIPT5007: Unable to get property 'bearingSnap' of undefined or null reference
File: mapbox-gl.js, Line: 162, Column: 1987
@roelvanhintum
Copy link
Author

After some more testing i found that v0.18.0 did work, v019.0 and v019.1 did not.

@roelvanhintum
Copy link
Author

Note: v0.18.0 only works when downloading the precompiled js, installing with npm uses newer dependencies causing the same problem. This hopefully narrows down the problem.

@mourner
Copy link
Member

mourner commented Jun 6, 2016

The bearingSnap thing is a different issue (caused by options refactor @lucaswoj), but the blank screen and the deps clue is very interesting... Will be tricky to track down.

@lucaswoj
Copy link
Contributor

lucaswoj commented Jun 6, 2016

The bearingSnap thing is a different issue (caused by options refactor @lucaswoj),

➡️ #2680

@roelvanhintum
Copy link
Author

In case anyone is interested, i fixed it for now by using a raster fallback. IE11 shows solid performance using raster styling.

var style = 'mapbox://styles/USER/MAPSTYLE';
var isSupported = mapboxgl.supported({ failIfMajorPerformanceCaveat: true });

// Fallback for older browsers.
if (!isSupported) {
    style = {
        version: 8,
        zoom: 13.418862563061706,
        sources: {
            'raster-tiles': {
                type: 'raster',
                tiles: [
                    'https://api.mapbox.com/styles/v1/USER/MAPSTYLE/tiles/{z}/{x}/{y}?access_token=' + accessToken,
                ],
                tileSize: 512,
            },
        },
        layers: [
            {
                id: 'simple-tiles',
                type: 'raster',
                source: 'raster-tiles',
                minzoom: zoom,
                maxzoom: this.mapMaxZoom,
            },
        ],
        sprite: 'mapbox://sprites/USER/MAPSTYLE',
        glyphs: 'mapbox://fonts/USER/{fontstack}/{range}.pbf',
    };
}

this.map = new mapboxgl.Map({
    container: 'map',
    style: style,
});

@lucaswoj
Copy link
Contributor

lucaswoj commented Jun 8, 2016

I know two things at this point:

  • the root problem seems to be an inability to pass messages to / from the workers
  • the bug seems to affect past versions of GL JS that were previously known to work on IE11 (I hope my testing methodology is wrong here 😞) Yup, my methodolgy was wrong, the breaking change was introduced between v0.18.0 and v0.19.0

@mourner
Copy link
Member

mourner commented Jun 8, 2016

@lucaswoj interesting, this seems to contradict an earlier statement:

Note: v0.18.0 only works when downloading the precompiled js, installing with npm uses newer dependencies causing the same problem.

@lucaswoj
Copy link
Contributor

lucaswoj commented Jun 8, 2016

maybe related: browserify/webworkify#26

lucaswoj pushed a commit that referenced this issue Jun 8, 2016
lucaswoj added a commit that referenced this issue Jun 9, 2016
blanchg pushed a commit to blanchg/mapbox-gl-js that referenced this issue Jun 13, 2016
@deefour
Copy link

deefour commented Aug 14, 2017

Is this actually fixed? I'm running mapbox-gl 0.38.0 and 0.39.1 and neither work in IE11 due to a "SecurityError" from web_worker.js at this line:

return new window.Worker(workerURL);

@JAugustusSmith
Copy link

I'm also getting the same error in IE 11

@deefour
Copy link

deefour commented Aug 29, 2017

@JAugustusSmith I sorted this out. I use the IE11 VM from modern.ie for IE testing. This VM has a "pre-release" build of IE from back in 2014. Microsoft seems to have never updated the VM image. WebGL is busted in that pre-release version.

Run windows software updates within the VM and you'll get an updated version of IE11 that works great.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants