Hi all,
This is probably a simple question, but how can I get the before and after height of a WHEEL ScreenSpaceEventHandler?
Here's what I have:
// Wheel Handler: Functionality for zoom in/out (mouse wheel)
WheelHandler = new Cesium.ScreenSpaceEventHandler(scene.canvas);
WheelHandler.setInputAction(
function (event) {
var mousePosition = scene.camera.position;
var height = ellipsoid.cartesianToCartographic(mousePosition).height;
console.log("Zoom: " + event + " | Height: " + height);
}, Cesium.CameraEventType.WHEEL);
The console generally logs this on zoom in/out:
Zoom: 120 | Height: 1383.0302729777552
Zoom: 120 | Height: 924.5651569244244
Zoom: 120 | Height: 620.3080954100334
Zoom: -120 | Height: 418.39081047853193
Zoom: -120 | Height: 552.3926363814553
Zoom: -120 | Height: 731.466938753359
The height is always the starting height, and I'm not sure what the zoom is representing (some factor of how far to zoom I'm guessing?) Since the 'event' parameter is only giving me an integer, are there any other options? Thanks in advance.