Is it possible to enable the map zoom in on a left double click as google earth behaves?
There is a closed github issue on this:
You refered him there to the ScreenSpaceCameraController, but it seems it does not support left double click.
You should be able to create a ScreenSpaceEventHandler which watched for a ScreenSpacedEventType, rather than a CameraEventType. ScreenSpaceEventType.LEFT_DOUBLE_CLICK is available for the double click. In that handler, you can call Camera.zoomIn to perform the camera zoom.
Would it be possible for you to post a sandcastle of left doubleclick zooming in? Thx.
This is the Sancastle demo.
You can modify the code to do incremental zooming (for example you can change the height input to Camera.flyTo as a function of the camera height).
Thanks, that works great. Yes, I’m looking to create incremental zoom in/out. Can you modify your example to show the destination height as a function of the camera height?
Also I took your sandcastle and added a zoom out on right click edited Sandcastle
@peakery you can do this by getting the camera height with
viewer.camera.positionWC.height (see https://cesium.com/docs/cesiumjs-ref-doc/Camera.html?classFilter=camera#positionWC). And pass that in minus some increment instead of the fixed height.