Change zoom-speed for two-finger-pinch?

Hi,

when using a Cesium Viewport in a mobile browser, one can zoom in and out with the two-finger-pinch. Is there any way to change the amount of zooming? At the moment, it feels a bit slow. This is not a performance issue, it is just the translation of the "pinch-amount" to the zoom-amount.

Thanks,

Heiner

I think you can configure this with the defaultZoomAmount:

https://cesiumjs.org/Cesium/Build/Documentation/Camera.html?classFilter=Camera#defaultZoomAmount

Let me know if that works. For reference, this is the class that handles the camera user input logic:

https://github.com/AnalyticalGraphicsInc/cesium/blob/master/Source/Scene/ScreenSpaceCameraController.js

I tried different values but could not see any difference in the behaviour.

I was wrong - looks like it’s a private property you need to change:

viewer.scene.screenSpaceCameraController._zoomFactor = 8; // defaults to 5

``

It’s defined in the top of the class here:

I opened a feature request to officially expose this here: https://github.com/AnalyticalGraphicsInc/cesium/issues/7978

Thanks for bringing this up!

Yeah, this fixes the issue :slight_smile:

Thanks,

Heiner