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

One-liner-ish to zoom to a 3D Tileset #5626

Closed
pjcozzi opened this issue Jul 13, 2017 · 0 comments
Closed

One-liner-ish to zoom to a 3D Tileset #5626

pjcozzi opened this issue Jul 13, 2017 · 0 comments

Comments

@pjcozzi
Copy link
Contributor

pjcozzi commented Jul 13, 2017

To reduce the amount of redudent code in Sandcastle examples like the BIM example:

tileset.readyPromise.then(function() {
    var boundingSphere = tileset.boundingSphere;
    viewer.camera.viewBoundingSphere(boundingSphere, new Cesium.HeadingPitchRange(0.5, -0.2, boundingSphere.radius * 4.0));
    viewer.camera.lookAtTransform(Cesium.Matrix4.IDENTITY);
}).otherwise(function(error) {
    throw(error);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants