-
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
Cesium ion logo - support for data URL scheme #9085
Conversation
1.48 release
Added extra info to README about branches, Terria
Thank you so much for the pull request @reginapramesti! I noticed this is your first pull request and I wanted to say welcome to the Cesium community! The Pull Request Guidelines is a handy reference for making sure your PR gets accepted quickly, so make sure to skim that.
Reviewers, don't forget to make sure that:
|
I work for CSIRO's Data61, and I believe I am already covered by their CLA |
Thanks @reginapramesti! The change makes sense to me. @OmarShehata can you easily confirm that this doesn't reintroduce the WebView logo problem fixed in #8758? |
It does seem like a safe change. I'd need to get my cordova re-setup, which I'm happy to do and re-test this in the next few days. |
Confirmed Cesium ion logo still works when running with this branch on Android with Cordova and there are no unexpected side effects. Thanks @reginapramesti ! |
Description of the Problem
In our TerriaJS application, the Cesium ion logo is represented as a data URL because our webpack configuration replaces
buildModuleUrl
with correspondingrequire
statements - as a result the logo doesn't render. This issue is a result of #8758 which introduces a scheme check on the logo URL. Because TerriaJS doesn't use ahttp(s)
URL scheme, and instead uses thedata:
scheme for the logo URL, the newly introduced code strips thedata:
scheme from the URL, and prevents the logo from rendering.How this PR fixes the Problem
We include the
data:
scheme check within theif
condition inCreditDisplay.js
which causes the logo to render appropriately on the TerriaJS application.Example
This is the data URL used by the TerriaJS application to represent the logo, however when this URL is passed through
getDefaultCredit()
, thedata:
is stripped and the logo is stored without a URL scheme. As a result, when loading the logo on the TerriaJS application, theimg src
looks for a resource on the server, rather than the base64 encoded data.