Capture Camera Data

1. A concise explanation of the problem you’re experiencing.

I have been looking for an example where a Camera view is captured and then returned to with a LookAt.

2. A minimal code example. If you’ve found a bug, this helps us reproduce and repair it.

3. Context. Why do you need to do this? We might know a better way to accomplish your goal.

I am developing “Animated Tour” software.

4. The Cesium version you’re using, your operating system and browser.

1.50 Windows Firefox

The built in Cesium Viewer app actually has a good example of this. It automatically saved the current camera view in the URL, and loads it on page load. Here’s where it saves it:

https://github.com/AnalyticalGraphicsInc/cesium/blob/master/Apps/CesiumViewer/CesiumViewer.js#L202-L209

And where it pulls it out of the URL and sets the view:

https://github.com/AnalyticalGraphicsInc/cesium/blob/master/Apps/CesiumViewer/CesiumViewer.js#L183-L197

Thanks yet again!

I will play a bit. My problem was that I am using

viewer.camera.lookAt(center, new Cesium.HeadingPitchRange(heading, pitch, range));

and couldn’t find the appropriate API documentation.