-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Zoom When Model Load Failure #6272
Comments
Thanks @jpthompson212! This issue has been around forever but mostly off our radar. Pretty sure it's a simple fix in ModelVisualizer.js. Basically, we need to update Another good beginner issue. We'd be happy to take a PR if you want to take a crack at this. 😄 |
Hey guys, Do you mind if I take a crack at this one? |
Hey @srwiseman, Of course not! |
Awesome. @jpthompson212 Can you post some quick reproduction steps, so that I know I'm seeing the exact same thing? |
Hi @srwiseman! Thanks for volunteering! To get started, see our contributor documentation. The Build Guide will give you instructions for checking out the code base and building the project. As @mramato said above, you'll most likely have to make changes to Here is an example to reproduce the issue: var czml = [{
"id" : "document",
"name" : "box",
"version" : "1.0"
}, {
"id" : "shape1",
"name" : "Blue box",
"position" : {
"cartographicDegrees" : [-114.0, 40.0, 300000.0]
},
"box" : {
"dimensions" : {
"cartesian": [400000.0, 300000.0, 500000.0]
},
"material" : {
"solidColor" : {
"color" : {
"rgba" : [0, 0, 255, 255]
}
}
}
}
}, {
"id" : "aircraft model",
"name" : "Cesium Air",
"position" : {
"cartographicDegrees" : [-77, 37, 10000]
},
"model": {
"gltf" : "invalid/model/path.glb",
"scale" : 2.0,
"minimumPixelSize": 128
}
}];
var viewer = new Cesium.Viewer('cesiumContainer');
var dataSourcePromise = Cesium.CzmlDataSource.load(czml);
viewer.dataSources.add(dataSourcePromise);
viewer.zoomTo(dataSourcePromise); Let us know if you have any questions! Looking forward to your pull request =) |
Awesome! Thanks! |
Ok, I've fixed this by adding a fail flag to the modelData, then adding a check for the failure condition in getBoundingSphere. I'll prepare the PR soon! :) |
When loading a CZML file and the model fails to load it causes the camera to never zoom to the entity. This is most likely because there is no detection of the model load failure.
Ideally, the model load failure would be detected and then the camera would zoom to the entity anyways.
The text was updated successfully, but these errors were encountered: