# Set max and min zoom

**URL:** <https://community.cesium.com/t/set-max-and-min-zoom/19691>\
**Category:** CesiumJS\
**Created:** [July 25, 2022, 10:35am UTC](https://community.cesium.com/t/set-max-and-min-zoom/19691 "2022-07-25T10:35:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![romza](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/romza/32/3476_2.png) [@romza](https://community.cesium.com/u/romza)\
**Post date:** [July 25, 2022, 10:35am UTC](https://community.cesium.com/t/set-max-and-min-zoom/19691/1 "2022-07-25T10:35:30Z")

</div>

Hi,  
I want to set a max and min zoom to prevent the model from disappearing when you zoom out too much.  
I’m not using the maps, so when you zoom out, or pan too much away from the model, you loose it, and then it’s impossible to bring it back, because there is no landmarks to help you come back to where the model is.  
I tried  
`viewer.scene.screenSpaceCameraController.maximumZoomDistance = 500;`  
It’s working for some model, not for others.

I looked at frustum far, but not sure how to use it.  
How can I forbid to zoom out/in too much or pan out too far from the model please ?  
Thanks for the help.

---

<div class="post-metadata">

**Author:** ![Gabby\_Getz](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/gabby_getz/32/7838_2.png) [@Gabby\_Getz](https://community.cesium.com/u/Gabby_Getz)\
**Post date:** [July 29, 2022, 6:15pm UTC](https://community.cesium.com/t/set-max-and-min-zoom/19691/2 "2022-07-29T18:15:16Z")

</div>

Hi there,

Besides properties of the screenSpaceCameraController`, you can try the `minimumPixelSize` property on the model like in [this example](https://sandcastle.cesium.com/?src=3D%20Models.html).

Hope that helps!
