-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Allow local-running Cesium to load its resources #5892
Conversation
@hpinkos, thanks for the pull request! Maintainers, we have a signed CLA from @hpinkos, so you can review this at any time. I noticed that CHANGES.md has not been updated. If this change updates the public API in any way, fixes a bug, or makes any non-trivial update, please add a bullet point to I am a bot who helps you make Cesium awesome! Thanks again. |
CHANGES.md
Outdated
|
||
* Breaking Changes | ||
* | ||
* Added the ability to load Cesium's assets from the local file system [#5830](https://github.com/AnalyticalGraphicsInc/cesium/issues/5830) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This description should probably be more specific as Cesium still can't access the local file system in typical scenarios because of browser security. Does this new feature support only Chromium with security disabled? Or does it impact other browsers as well? It's unclear to me is xhr.status === 0
is common or not.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To answer my own question, status 0 for file protocol is very common and even jQuery deals with it: https://github.com/jquery/jquery/blob/master/src/ajax/xhr.js#L17
# Conflicts: # CHANGES.md
I tweaked the commands, but that's it. Thanks. |
I can see this change live in the source (I'm building from NPM via Webpack) but I still have the problem it purports to fix. Should I pursue here or open a new ticket? Chromium latest, Ubuntu 16.04, running with (15 minutes pass...) Aaaand I got it. The above patch catches requests to an absolute file URI, only. My problem is I'm making a relative request -- asking for I still (!!!) haven't sorted out my CLA issues with management so I will humbly suggest merely changing L178 (in this patch, which is still the latest commit to
to
The catch of course is that this is "browser-dependent", per the docs on Location.origin, but the patch is specifically for a Chrome quirk in the first place (right?), so I think it all works out. |
Replaces #5831
Fixes #5830