Goal:
- Animate or set a tilt for the Cesium camera, «à la Google Maps». IE keeping the bottom line of the view unchanged.
- The view has to keep unchanged, if an angle is applied once positive then one negative.
- It has to work whatever the rotation to the north is (as it can be changed in ol3’s 2D view).
Input:
- A cesium scene with a camera positionned from its ol3 equivalent:
- extent set with
viewExtent
method, - rotation (to the north) set with
twistLeft
method
- extent set with
- a angle
α
(positive/negative) to tilt the view of, - a animation duration (in ms, may equals 0 for immediate change).
Code:
- The code should replace the method
setTiltedView
in this Gist - Current implementation set camera angle with the camera as the origin AND move up/down to simulate the wanted effect.