javascriptcesiumjs

Cesium: Disable Zooming option


I want to enable/disable dynamically zoom in or zoom out either by mouse events or keyboard events option in my map using cesium. Is there any option or function in cesium on this functionality to enable/disable?


Solution

  • Yes, this is quite easy, just set enableZoom to false.

    var viewer = new Cesium.Viewer('cesiumContainer');
    
    viewer.scene.screenSpaceCameraController.enableZoom = false;