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

CallbackProperty causes crash for polygon entity on terrain #4222

Closed
hpinkos opened this issue Aug 22, 2016 · 0 comments · Fixed by #4255
Closed

CallbackProperty causes crash for polygon entity on terrain #4222

hpinkos opened this issue Aug 22, 2016 · 0 comments · Fixed by #4255

Comments

@hpinkos
Copy link
Contributor

hpinkos commented Aug 22, 2016

For the below code example, the polygon only works if you set height: 0
Otherwise it crashes here because groundPrimitives is undefined

var viewer = new Cesium.Viewer('cesiumContainer');
viewer.entities.add({
    polygon : {
        //height: 0,
        hierarchy : new Cesium.CallbackProperty(function() { 
            return Cesium.Cartesian3.fromDegreesArray([-115.0, 37.0,
                                                        -115.0, 32.0,
                                                        -107.0, 33.0,
                                                        -102.0, 31.0,
                                                       -102.0, 35.0]);
                                                      }, false),
        material : Cesium.Color.RED
    }
});
mramato added a commit that referenced this issue Aug 30, 2016
All dynamic geometry terrain draping was broken.  I made the fix and added
a test that fails without it.

Fixes #4222
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant