首页 > 解决方案 > Fix minimum size of 3D globe cesium

问题描述

I want to fix the minimum size of 3D globe such as if user decreases the size through mouse it should not decrease beyond some fixed value.

var viewer = new Cesium.Viewer("cesiumContainer", {

animation: false,

timeline: false

});

Sandcastle Link

Any help is highly appreciated, Thanks

标签: javascriptcesium

解决方案


viewer.scene.screenSpaceCameraController.minimumZoomDistance = 6378137;
viewer.scene.screenSpaceCameraController.maximumZoomDistance = 6378137 * 2;

推荐阅读