# camera.setView() does not work

**URL:** <https://community.cesium.com/t/camera-setview-does-not-work/5081>\
**Category:** CesiumJS\
**Created:** [January 26, 2017, 1:57pm UTC](https://community.cesium.com/t/camera-setview-does-not-work/5081 "2017-01-26T13:57:34Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Frederic\_Brodbeck](https://avatars.discourse-cdn.com/v4/letter/f/c68b51/32.png) [@Frederic\_Brodbeck](https://community.cesium.com/u/Frederic_Brodbeck)\
**Post date:** [January 26, 2017, 1:57pm UTC](https://community.cesium.com/t/camera-setview-does-not-work/5081/1 "2017-01-26T13:57:34Z")

</div>

hi,

I want to set the initial view of the camera when the scene first loads. according to the camera tutorial ([http://cesiumjs.org/tutorials/Camera-Tutorial/](http://cesiumjs.org/tutorials/Camera-Tutorial/)) it should be as easy as:

const viewer = new Cesium.Viewer('cesiumContainer', viewerOptions);  
const startPos = Cesium.Cartesian3.fromDegrees(4.8951722, 52.3710947, 150000);  
viewer.camera.setView({ position: startPos });

this does not have any effect. – flying to a position however works fine:

viewer.camera.flyTo({ destination: startPos });

am I missing s.th. here?

thanks a lot in advance!

---

<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 26, 2017, 2:19pm UTC](https://community.cesium.com/t/camera-setview-does-not-work/5081/2 "2017-01-26T14:19:27Z")

</div>

Hello,

Sorry, the code example is outdated in that tutorial. I’ll update that now.

Use this instead:

viewer.camera.setView({  
destination: startPos  
orientation: {  
heading: heading,  
pitch: pitch,  
roll: roll  
}  
});

``

Best,

Hannah

---

<div class="post-metadata">

**Author:** ![Frederic\_Brodbeck](https://avatars.discourse-cdn.com/v4/letter/f/c68b51/32.png) [@Frederic\_Brodbeck](https://community.cesium.com/u/Frederic_Brodbeck)\
**Post date:** [January 26, 2017, 2:20pm UTC](https://community.cesium.com/t/camera-setview-does-not-work/5081/3 "2017-01-26T14:20:55Z")

</div>

I also just realized that. — thanks hannah.
