# Get Rectangle/Wall position from Camera View

**URL:** <https://community.cesium.com/t/get-rectangle-wall-position-from-camera-view/3593>\
**Category:** CesiumJS\
**Created:** [January 18, 2016, 9:24pm UTC](https://community.cesium.com/t/get-rectangle-wall-position-from-camera-view/3593 "2016-01-18T21:24:16Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jakub\_Faber](https://avatars.discourse-cdn.com/v4/letter/j/4491bb/32.png) [@Jakub\_Faber](https://community.cesium.com/u/Jakub_Faber)\
**Post date:** [January 18, 2016, 9:24pm UTC](https://community.cesium.com/t/get-rectangle-wall-position-from-camera-view/3593/1 "2016-01-18T21:24:16Z")

</div>

Hello, is there any way to get Rectangle/Wall coords from current Camera View (img on stackoverflow). I would like to create a Rectangle/Wall on same spot with image material.

> <https://stackoverflow.com/questions/34863322/get-cameras-rectangle-position-from-cesiumjs>

Thank you very much  
Jacob F

---

<div class="post-metadata">

**Author:** ![hannah](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/hannah/32/4509_2.png) [@hannah](https://community.cesium.com/u/hannah)\
**Post date:** [January 18, 2016, 9:56pm UTC](https://community.cesium.com/t/get-rectangle-wall-position-from-camera-view/3593/2 "2016-01-18T21:56:39Z")

</div>

Hello Jacob,

This is a surprisingly complicated problem to solve. We have an open issue [here](https://github.com/AnalyticalGraphicsInc/cesium/issues/871), but I don’t have any timeline for when we’ll be able to implement it.

Best,

Hannah

---

<div class="post-metadata">

**Author:** ![hannah](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/hannah/32/4509_2.png) [@hannah](https://community.cesium.com/u/hannah)\
**Post date:** [January 18, 2016, 9:59pm UTC](https://community.cesium.com/t/get-rectangle-wall-position-from-camera-view/3593/3 "2016-01-18T21:59:51Z")

</div>

Also, what’s your motivation behind wanting the camera’s rectangle?  
I might be able to help you solve your problem a different way.

-Hannah

---

<div class="post-metadata">

**Author:** ![Jakub\_Faber](https://avatars.discourse-cdn.com/v4/letter/j/4491bb/32.png) [@Jakub\_Faber](https://community.cesium.com/u/Jakub_Faber)\
**Post date:** [January 18, 2016, 10:19pm UTC](https://community.cesium.com/t/get-rectangle-wall-position-from-camera-view/3593/4 "2016-01-18T22:19:30Z")

</div>

Thank for replies,

I have those values:

{ “pitch” : -3.76999, “roll” : 1.84288, “yaw” : 49.9063 }, { “latitude” : 46.5373, “longitude” : 8.12605 }, { “filepath” : “finsteraarhorn01.jpg”, “hfov” : 0.210625 }

I would like to put Rectangle/Wall with image overlay. Unfortunately I don’t have image’s position but I have managed to set correct camera view. That’s why I need to create Rectangle/Wall from camera’s view.

Dne pondělí 18. ledna 2016 22:59:52 UTC+1 Hannah Pinkos napsal(a):

---

<div class="post-metadata">

**Author:** ![hannah](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/hannah/32/4509_2.png) [@hannah](https://community.cesium.com/u/hannah)\
**Post date:** [January 21, 2016, 9:55pm UTC](https://community.cesium.com/t/get-rectangle-wall-position-from-camera-view/3593/5 "2016-01-21T21:55:52Z")

</div>

Hmm… well if you look at the issue I posted, there are some workarounds you might be able to use like using picking on the window coordinates.

-Hannah

---

<div class="post-metadata">

**Author:** ![hannah](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/hannah/32/4509_2.png) [@hannah](https://community.cesium.com/u/hannah)\
**Post date:** [March 4, 2016, 3:09pm UTC](https://community.cesium.com/t/get-rectangle-wall-position-from-camera-view/3593/6 "2016-03-04T15:09:35Z")

</div>

Hello Jacob,

I just wanted to let you know that we recently added a function to get the camera view rectangle. See [Camera.computeViewRectangle](http://cesiumjs.org/Cesium/Build/Documentation/Camera.html?computeViewRectangle)

Best,

Hannah

---

<div class="post-metadata">

**Author:** ![robb](https://avatars.discourse-cdn.com/v4/letter/r/a183cd/32.png) [@robb](https://community.cesium.com/u/robb)\
**Post date:** [August 1, 2017, 4:50pm UTC](https://community.cesium.com/t/get-rectangle-wall-position-from-camera-view/3593/7 "2017-08-01T16:50:58Z")

</div>

It doesn't work for me. I try to fly to the rectangle obtained from the e/w/n/s coordinates that this method returns. It doesn't fly to the rectangle.

var rectangle = Cesium.Rectangle.fromDegrees(west, south, east, north)

The coordinates are different.

---

<div class="post-metadata">

**Author:** ![Rachel\_Hwang](https://avatars.discourse-cdn.com/v4/letter/r/d78d45/32.png) [@Rachel\_Hwang](https://community.cesium.com/u/Rachel_Hwang)\
**Post date:** [August 8, 2017, 3:00pm UTC](https://community.cesium.com/t/get-rectangle-wall-position-from-camera-view/3593/8 "2017-08-08T15:00:39Z")

</div>

Hi there,

Is this is 2D or 3D? This may be a bug. Can we have more information and a screenshot or code example?

Thanks,

- Rachel
