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
omar
June 12, 2019, 6:33pm
2
google
June 13, 2019, 10:13am
3
I tried different values but could not see any difference in the behaviour.
omar
July 2, 2019, 8:41pm
4
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:
this._looking = false;
this._rotating = false;
this._strafing = false;
this._zoomingOnVector = false;
this._rotatingZoom = false;
var projection = scene.mapProjection;
this._maxCoord = projection.project(new Cartographic(Math.PI, CesiumMath.PI_OVER_TWO));
// Constants, Make any of these public?
this._zoomFactor = 5.0;
this._rotateFactor = undefined;
this._rotateRateRangeAdjustment = undefined;
this._maximumRotateRate = 1.77;
this._minimumRotateRate = 1.0 / 5000.0;
this._minimumZoomRate = 20.0;
this._maximumZoomRate = 5906376272000.0; // distance from the Sun to Pluto in meters.
}
function decay(time, coefficient) {
if (time < 0) {
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
Thanks,
Heiner