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

Internet Explorer 11 #246

Closed
pelord opened this issue Nov 26, 2019 · 3 comments · Fixed by #248
Closed

Internet Explorer 11 #246

pelord opened this issue Nov 26, 2019 · 3 comments · Fixed by #248

Comments

@pelord
Copy link

pelord commented Nov 26, 2019

Yeah I know. Internet Explorer 11. (shame)

I use ol-mapbox-style inside my project (GitHub igo2-lib).

Everything is normal on Firefox, Edge, Chrome, no surprise.

Here the errors I get on Internet Explorer 11

  • Const must be initialized => solved manually by replacing into the package : for(const by for(let
  • Hereafther:
    - An error about the foreach definition
    image
    - An error about the .map definition ....
    - I've stoped there... but seem to still have some issues.

Initially, I've checked if it was my project causing the error but the OpenLayers demo also have the issue.

My project demo : https://infra-geo-ouverte.github.io/igo2/
Openlayers demo: https://openlayers.org/en/latest/examples/mapbox-style.html

@pelord
Copy link
Author

pelord commented Nov 26, 2019

Seem to be related with #199

@ahocevar
Copy link
Member

ahocevar commented Nov 27, 2019

This is indeed the same issue as #199. In your case, it should be enough to change the "target" in your tsconfig.json's "compilerOptions" from "es5" to "es3".

Then you'll also no longer need to replace anything in your package.

In case that's not enough, you'll need to configure angular to use an Array.prototype.forEach and Array.prototype.map polyfill.

@pelord
Copy link
Author

pelord commented Nov 27, 2019

We solved it by using Babel finally.

Thanks for your support!

infra-geo-ouverte/igo2-lib@938e2de

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

Successfully merging a pull request may close this issue.

2 participants