# distanceDisplayCondition while changing height + hFOV

**URL:** <https://community.cesium.com/t/distancedisplaycondition-while-changing-height-hfov/11287>\
**Category:** CesiumJS\
**Created:** [October 20, 2020, 10:24am UTC](https://community.cesium.com/t/distancedisplaycondition-while-changing-height-hfov/11287 "2020-10-20T10:24:53Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![arieleb](https://avatars.discourse-cdn.com/v4/letter/a/7ab992/32.png) [@arieleb](https://community.cesium.com/u/arieleb)\
**Post date:** [October 20, 2020, 10:24am UTC](https://community.cesium.com/t/distancedisplaycondition-while-changing-height-hfov/11287/1 "2020-10-20T10:24:54Z")

</div>

Let’s take for example the `LabelGraphic` entity. ([https://cesium.com/docs/cesiumjs-ref-doc/LabelGraphics.html?classFilter=label](https://cesium.com/docs/cesiumjs-ref-doc/LabelGraphics.html?classFilter=label))

This entity exposes property called `distanceDisplayCondition` in order to show / hide the entity according to the distance from the camera. yet this is only good when the camera height or the zoom (hFOV/vFOV) of the camera are constant.

In my use case these both values are changing dynamically, so I could have camera that is very far from an entity yet a narrow hFOV, or the opposite, a camera that is very close to the entity but with wide hFOV so the area of the frame is big. so providing a constant value to `distanceDisplayCondition` is not good enough.

I am looking for a way to either change the `distanceDisplayCondition` dynamically or change the show / hide of the entity according to some custom logic.

`CallbackProperty` for the show property is not a good choice since its using a lot cpu, and I need this logic to be running all the time so it should go on the GPU the same as `distanceDisplayCondition` works.

Are there any suggestion how to utilize the `distanceDisplayCondition` in the above usecase?

---

<div class="post-metadata">

**Author:** ![dzung](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/dzung/32/2996_2.png) [@dzung](https://community.cesium.com/u/dzung)\
**Post date:** [October 26, 2020, 6:37pm UTC](https://community.cesium.com/t/distancedisplaycondition-while-changing-height-hfov/11287/2 "2020-10-26T18:37:41Z")

</div>

Hi,

The field of view should not be affecting the distance of from camera and distanceDisplayCondition should work well. Would you be able to share a Sandcastle example or screenshots/gifs/videos of the use case?

---

<div class="post-metadata">

**Author:** ![arieleb](https://avatars.discourse-cdn.com/v4/letter/a/7ab992/32.png) [@arieleb](https://community.cesium.com/u/arieleb)\
**Post date:** [October 27, 2020, 5:49am UTC](https://community.cesium.com/t/distancedisplaycondition-while-changing-height-hfov/11287/3 "2020-10-27T05:49:40Z")

</div>

Hey, this is more of a concept rather than actual code,

Indeed the fov does not affect the distance from the camera, but it affects the size of the footprint. and I want the ability to show / hide elements according to this size, since when the footprint is “LARGE” I want to show X+Y entities and when it’s “SMALL” i want to show X entities. (they all in the view)
