It works fine for 3D but not for 2D. you can check it in sandcastle.
Can you please tell me what should I do to get this work in 2D?
If you have a better way for zooming to mouse point in 2D,
I would be very grateful to know about it.
if (scene.mode !== Cesium.SceneMode.SCENE3D) {
//Determine Camera position https://groups.google.com/d/msg/cesium-dev/QSFf3RxNRfE/XotNBSBdFQgJ
//calculate the vector between camera ground position and mouse ground position so you can calculate a
//moveLeft amount and a moveForward amount; This will need probably have a scaling factor based on height
//similar to the zoomAmount;
camera.zoomIn (zoomAmount);
camera.moveLeft(leftAmount);
camera.moveForward(forwardAmount);
} else {
directionToZoom = camera.getPickRay(mousePosition).direction;
camera.move(directionToZoom, zoomAmount);
}
}