-
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
Apply styles to photogrammetry #7255
Conversation
Thanks for the pull request @lilleyse!
Reviewers, don't forget to make sure that:
I am a bot who helps you make Cesium awesome! Contributions to my configuration are welcome. 🌍 🌎 🌏 |
@lilleyse does this require a spec update - either normative or implementation note? |
After reading the styling page, yes it does require normative update. I opened a spec PR here: CesiumGS/3d-tiles#352. |
This is awesome @lilleyse ! I can run my original transparency demo from the forum thread now. All tests are passing, and works in Chrome, Edge and IE11. The only thing I feel uneasy about is:
Since that means photogrammetry wouldn't be able to use time-based styles, and it would be kind of opaque to the user why this doesn't work. This built in time variable is only documented in the spec, and it would be strange to add to add this CesiumJS specific implementation issue there. I guess getting that to work would require passing in the original tileset to the evaluate function? Is that a difficult refactor? It might be worth at least opening up an issue for. |
We could add more info to this issue #5550. Basically |
Oh! Yeah I think in that case, just update that issue saying that it also won't work when there are no features, and I think this is good to merge. I can bump the forum thread once it's merged. |
I updated #5550. |
You have to merge this yourself by the way @lilleyse . |
@ggetz please do a final review and merge. Thanks. |
expression = new Expression('${feature["vector"]}'); | ||
expect(expression.evaluate(undefined)).toBeUndefined(); | ||
|
||
// Evaluating inside a string is an exception. "" is returned instead of "undefined" |
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.
Why is this an exception? It looks like we determine the behavior in the previous test for what do when printing an undefined property.
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.
Oh just an exception in reference to the name of the test "evaluates variable to undefined if feature is undefined"
Looks good other than that one comment. |
Fixes #7149
Styles now work for tilesets that don't have features. All property expressions (e.g.
${Height}
) evaluate to undefined.@OmarShehata can you review?