# How to control the extent of the camera in 2D map?

**URL:** <https://community.cesium.com/t/how-to-control-the-extent-of-the-camera-in-2d-map/4988>\
**Category:** CesiumJS\
**Created:** [January 5, 2017, 3:25pm UTC](https://community.cesium.com/t/how-to-control-the-extent-of-the-camera-in-2d-map/4988 "2017-01-05T15:25:02Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rick\_Bing](https://avatars.discourse-cdn.com/v4/letter/r/6bbea6/32.png) [@Rick\_Bing](https://community.cesium.com/u/Rick_Bing)\
**Post date:** [January 5, 2017, 3:25pm UTC](https://community.cesium.com/t/how-to-control-the-extent-of-the-camera-in-2d-map/4988/1 "2017-01-05T15:25:02Z")

</div>

Hello,

I want to know how to avoid the black area when I move the camera and I don’t want the 2D map can be scrolled infinitely in the horizontal direction.

```
  In the Cesium's API, I only found two patterns of the MapMode2D， the one is INFINITE_SCROLL, the other one is ROTATE, but it is a pity that the two are not what I want.

 I hope you can help me to solve it, thanks

```

[![](https://lh3.googleusercontent.com/-oqNqTk37YUA/WG5jS_h-H2I/AAAAAAAAAEE/MLvHENhT0UsIKH5Lu2u5jXJNGUds-RH1wCLcB/s320/QQ%25E6%2588%25AA%25E5%259B%25BE20170105231558.png)](https://lh3.googleusercontent.com/-oqNqTk37YUA/WG5jS_h-H2I/AAAAAAAAAEE/MLvHENhT0UsIKH5Lu2u5jXJNGUds-RH1wCLcB/s1600/QQ%25E6%2588%25AA%25E5%259B%25BE20170105231558.png)

[![](https://lh3.googleusercontent.com/-wbPzz1XnX9I/WG5hSGqTtOI/AAAAAAAAAD4/jCqgnVo0aTUzG1zF2B0X6NkhHdX6Q021gCLcB/s320/QQ%25E6%2588%25AA%25E5%259B%25BE20170105230726.png)](https://lh3.googleusercontent.com/-wbPzz1XnX9I/WG5hSGqTtOI/AAAAAAAAAD4/jCqgnVo0aTUzG1zF2B0X6NkhHdX6Q021gCLcB/s1600/QQ%25E6%2588%25AA%25E5%259B%25BE20170105230726.png)

---

<div class="post-metadata">

**Author:** ![liayuan](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/liayuan/32/12437_2.png) [@liayuan](https://community.cesium.com/u/liayuan)\
**Post date:** [March 24, 2023, 2:51am UTC](https://community.cesium.com/t/how-to-control-the-extent-of-the-camera-in-2d-map/4988/2 "2023-03-24T02:51:47Z")

</div>

I have the same question. Have you solved it yet?
