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

isArray not used in UrlTemplateImageryProvider #4554

Closed
fredj opened this issue Oct 31, 2016 · 4 comments · Fixed by #4558
Closed

isArray not used in UrlTemplateImageryProvider #4554

fredj opened this issue Oct 31, 2016 · 4 comments · Fixed by #4558

Comments

@fredj
Copy link
Contributor

fredj commented Oct 31, 2016

Array.isArray is used instead of the isArray module.

@fredj
Copy link
Contributor Author

fredj commented Oct 31, 2016

Array.isArray is also used in WebMapTileServiceImageryProvider

@fredj
Copy link
Contributor Author

fredj commented Oct 31, 2016

The native Array.isArray function is widely supported, would you consider dropping isArrayand always use the native function?

@mramato
Copy link
Contributor

mramato commented Oct 31, 2016

The main reason we still have the isArray helper is to allow Cesium to still be included on sites that need to support older browsers (mainly IE8). Obviously Cesium won't work on these browsers, but trying to use a method like isArray would cause JS parsing itself to fail in certain cases, breaking the entire page. This would make it impossible for apps built with Cesium to gracefully degrade on old browsers.

We could only use the isArray helper function is global initialization code and Array.isArray everywhere else, but it's just easier to always use the helper function instead.

That all being said, we can certainly change our policy at some point in the future, but making Cesium fundamentally incompatible with IE8 is something that would need to be discussed with the community first.

@fredj
Copy link
Contributor Author

fredj commented Oct 31, 2016

@mramato thanks for the answer; I will change UrlTemplateImageryProvider and WebMapTileServiceImageryProvider to use isArray instead of Array.isArray

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