0

Using cesium it is possible to pan the 2D map having Asia as the center?

Example as shown in the image. enter image description here

2 Answers 2

1

solved the problem by using cesium 1.34 And the following codes

    var target = new Cesium.Cartesian3.fromDegrees(103.85195, 1.290270, 35000000);
    viewer.camera.setView( { destination : target,
    orientation: {
    heading : Cesium.Math.toRadians(90.0), // east, default value is 0.0 (north)
    pitch : Cesium.Math.toRadians(-90),    // default value (looking down)
    roll : 0.0                             // default value
}});
0

Give this a try:

Cesium.Camera.DEFAULT_VIEW_RECTANGLE = Cesium.Rectangle.fromDegrees(0, -89, 170, 89);
Cesium.Camera.DEFAULT_VIEW_FACTOR = 1.1;

var viewer = new Cesium.Viewer('cesiumContainer');

viewer.scene.morphTo2D(0);

Note the fromDegrees parameters are: West, South, East, North.

Also note this sets up the default (home) view this way. If you wanted to pan the camera here at runtime, there are other ways to do this, see the Camera Demo.

2
  • Hi Emackey, Please see link. I manager to get it pan but it didn't wrap around however the example link works. Commented Jun 21, 2017 at 3:30
  • You might need to upgrade to a more recent version of Cesium. What version are you using?
    – emackey
    Commented Jun 21, 2017 at 15:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.