-
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
sampleHeight bug #7120
Comments
Hi @hieeyh What happens when you click "Sample height" and "Sample height supported" in this demo? It's possible that |
If theris a 2D billboard, it will report this error. But if exclude this 2D billboard, sometimes success, sometimes fail. |
Thanks @hieeyh, I can replicate the bug with this example. It throws the error if the picked object doesn't write depth, like when As a workaround you can add any billboards or other objects not meant to be sampled to the |
The example I posted should now work in #7115. Example on offscreen-picking branch @hieeyh if you have a chance would you mind testing your app with this build to see if it fixed your problem? A link to download the build is here: http://cesium-dev.s3-website-us-east-1.amazonaws.com/cesium/offscreen-picking/Cesium-1.49.0-offscreen-picking29051.zip |
code:
let cartographicPosition = new Cesium.Cartographic()
cartographicPosition.longitude = mapUtil.angleToRadian(113.939499)
cartographicPosition.latitude = mapUtil.angleToRadian(22.5262237)
let takeOffheight = scene.sampleHeight(cartographicPosition)
result:
TypeError: Cannot read property 'x' of undefined
at n (Cesium.js:445)
at Function.s.fromCartesian (Cesium.js:445)
at we.sampleHeight (Cesium.js:526)
The text was updated successfully, but these errors were encountered: