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

Change usage of followSurface to arcType. Add CZML property for it. #7582

Merged
merged 7 commits into from
Feb 21, 2019

Conversation

shehzan10
Copy link
Member

Change the existing usages followSurface to arcType.

CZML requires a new property to be added, which this PR also adds.

Fixes #7572

@cesium-concierge
Copy link

Thanks for the pull request @shehzan10!

  • ✔️ Signed CLA found.
  • CHANGES.md was not updated.
    • If this change updates the public API in any way, please add a bullet point to CHANGES.md.

Reviewers, don't forget to make sure that:

  • Cesium Viewer works.
  • Works in 2D/CV.
  • Works (or fails gracefully) in IE11.

@shehzan10
Copy link
Member Author

@mramato Would you mind looking at this?

CHANGES.md Outdated Show resolved Hide resolved
@hpinkos
Copy link
Contributor

hpinkos commented Feb 20, 2019

I would like to get this merged before the release.

cc @shunter, we need to add this new CZML property to czml-writer

@hpinkos
Copy link
Contributor

hpinkos commented Feb 21, 2019

This looks good to me! Thanks @shehzan10

@shunter let me know if there's anything else we need to do

@hpinkos hpinkos merged commit 0fda487 into CesiumGS:master Feb 21, 2019
@shunter
Copy link
Contributor

shunter commented Feb 28, 2019

FYI looks like this change causes a crash when loading any CZML file which uses followSurface. I guess there are no tests whatsoever for that codepath?

@hpinkos
Copy link
Contributor

hpinkos commented Feb 28, 2019

oh no, thanks @shunter. looking into that right now

// See https://github.com/AnalyticalGraphicsInc/cesium/pull/7582#discussion_r258695385
if (defined(polylineData.followSurface) && !defined(polylineData.arcType)) {
if (polyline.followSurface) {
processPacketData(ArcType, polyline, 'arcType', ArcType.GEODESIC, interval, sourceUri, entityCollection);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In addition to several coding errors, this approach won't work in general, since followSurface could be time-varying. Rather than turning a boolean into an ArcType, this needs to turn a Property<boolean> into a Property<ArcType> which is essentially map since Property objects are basically functions.

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 this pull request may close these issues.

4 participants