How to check if a coordinate is visible by the camera

Hello!
I’m trying to check if a specific coordinate is currently visible by the camera, I need this inorder to hide something in the site UI (html) so for example, when I can no longer see a person located at (lon,lat) I need to do something.

Is there a way via cesium camera or cesium API to check if a given lon lat is currently on screen ? ?

Hi David,

Yep! There are some nice code examples in this thread for visibility testing: https://groups.google.com/forum/?hl=en#!msg/cesium-dev/ZSGJAUqnGR0/_lPChfGTAQAJ;context-place=forum/cesium-dev

These check for a Cartesian3 position, but you can easily convert to/from lat/long.

Hope that helps!

  • Rachel