I need to configure my Cesium viewer so that it always centered at certain point (coordinates 43.350116,132.159633) in Columbus mode (2.5D). Whenever I open my page with the Cesium JS viewer, it schould look like this: http://i.stack.imgur.com/RExUz.png .
In order to do this, I started with the following code:
var viewer = new Cesium.Viewer('cesiumContainer',
var x = 43.350116;
var y = 132.159633;
var offsetX = 0.07;
var offsetY = 0.07;
var scene = viewer.scene;
var ellipsoid = Cesium.Ellipsoid.WGS84;
var west = Cesium.Math.toRadians(y - offsetY);
var south = Cesium.Math.toRadians(x + offsetX);
var east = Cesium.Math.toRadians(y + offsetY);
var north = Cesium.Math.toRadians(x - offsetX);
var extent = new Cesium.Rectangle(west, south, east, north);
One thing is missing here: In an answer on StackOverflow to a similar question ( http://stackoverflow.com/questions/23779136/cesium-js-center-map-in-2d-scene-mode ) user Sean suggested to call camera.setPositionCartographic ( Cesium.Cartographic.fromDegrees(a,b,c));.
When I try to call
I get the error
Uncaught TypeError: scene.camera.viewPositionCartographic is not a function.
How can I fix it (make sure that the Columbus view is centered at 43.350116,132.159633 when I open the browser) ?
Thanks in advance
P. S.: You can earn StackOverflow reputation points by answering the question there - http://stackoverflow.com/questions/30007546/how-to-center-cesiumjs-map-in-columbus-view-at-a-particular-point .