| | |
| | | }) |
| | | |
| | | // 最小 |
| | | global.viewer.scene.screenSpaceCameraController.minimumZoomDistance = 220 |
| | | global.viewer.scene.screenSpaceCameraController.minimumZoomDistance = 100 |
| | | // 最大 |
| | | global.viewer.scene.screenSpaceCameraController.maximumZoomDistance = 400 |
| | | |
| | |
| | | global.viewer.camera.positionCartographic.height |
| | | ) |
| | | |
| | | if (height <= 250) { |
| | | if (height < 150) { |
| | | global.viewer.camera.setView({ |
| | | destination: |
| | | global.DC.Namespace.Cesium.Cartesian3.fromRadians( |
| | | global.viewer.camera.positionCartographic.longitude, |
| | | global.viewer.camera.positionCartographic.latitude, |
| | | 280 |
| | | 200 |
| | | ), |
| | | orientation: { |
| | | // 指向 |
| | |
| | | roll: 0.0 |
| | | } |
| | | }) |
| | | |
| | | return |
| | | } |
| | | |
| | | if (height > 250 && height <= 310) { |
| | | if (height < 250) { |
| | | global.viewer.camera.setView({ |
| | | destination: |
| | | global.DC.Namespace.Cesium.Cartesian3.fromRadians( |
| | | global.viewer.camera.positionCartographic.longitude, |
| | | global.viewer.camera.positionCartographic.latitude, |
| | | 340 |
| | | 300 |
| | | ), |
| | | orientation: { |
| | | // 指向 |
| | |
| | | roll: 0.0 |
| | | } |
| | | }) |
| | | |
| | | return |
| | | } |
| | | |
| | | if (height > 310 && height < 370) { |
| | | if (height < 350) { |
| | | global.viewer.camera.setView({ |
| | | destination: |
| | | global.DC.Namespace.Cesium.Cartesian3.fromRadians( |
| | |
| | | global.viewer.camera.positionCartographic.height |
| | | ) |
| | | |
| | | if (height > 370) { |
| | | if (height > 350) { |
| | | global.viewer.camera.setView({ |
| | | destination: |
| | | global.DC.Namespace.Cesium.Cartesian3.fromRadians( |
| | | global.viewer.camera.positionCartographic.longitude, |
| | | global.viewer.camera.positionCartographic.latitude, |
| | | 340 |
| | | ), |
| | | orientation: { |
| | | // 指向 |
| | | heading: global.DC.Namespace.Cesium.Math.toRadians(0, 0), |
| | | // 视角 |
| | | pitch: global.DC.Namespace.Cesium.Math.toRadians(-90), |
| | | roll: 0.0 |
| | | } |
| | | }) |
| | | |
| | | return |
| | | } |
| | | |
| | | if (height > 310) { |
| | | global.viewer.camera.setView({ |
| | | destination: |
| | | global.DC.Namespace.Cesium.Cartesian3.fromRadians( |
| | | global.viewer.camera.positionCartographic.longitude, |
| | | global.viewer.camera.positionCartographic.latitude, |
| | | 280 |
| | | 300 |
| | | ), |
| | | orientation: { |
| | | // 指向 |
| | |
| | | global.DC.Namespace.Cesium.Cartesian3.fromRadians( |
| | | global.viewer.camera.positionCartographic.longitude, |
| | | global.viewer.camera.positionCartographic.latitude, |
| | | 220 |
| | | 200 |
| | | ), |
| | | orientation: { |
| | | // 指向 |
| | | heading: global.DC.Namespace.Cesium.Math.toRadians(0, 0), |
| | | // 视角 |
| | | pitch: global.DC.Namespace.Cesium.Math.toRadians(-90), |
| | | roll: 0.0 |
| | | } |
| | | }) |
| | | |
| | | return |
| | | } |
| | | |
| | | if (height > 150) { |
| | | global.viewer.camera.setView({ |
| | | destination: |
| | | global.DC.Namespace.Cesium.Cartesian3.fromRadians( |
| | | global.viewer.camera.positionCartographic.longitude, |
| | | global.viewer.camera.positionCartographic.latitude, |
| | | 100 |
| | | ), |
| | | orientation: { |
| | | // 指向 |
| | |
| | | } |
| | | }) |
| | | |
| | | if (height <= 250) { |
| | | if (height < 150) { |
| | | global.viewer.camera.setView({ |
| | | destination: global.DC.Namespace.Cesium.Cartesian3.fromRadians( |
| | | global.viewer.camera.positionCartographic.longitude, |
| | | global.viewer.camera.positionCartographic.latitude, |
| | | 220 |
| | | 100 |
| | | ), |
| | | orientation: { |
| | | // 指向 |
| | |
| | | }) |
| | | } |
| | | |
| | | if (height > 250 && height <= 310) { |
| | | if (height > 150 && height <= 250) { |
| | | global.viewer.camera.setView({ |
| | | destination: global.DC.Namespace.Cesium.Cartesian3.fromRadians( |
| | | global.viewer.camera.positionCartographic.longitude, |
| | | global.viewer.camera.positionCartographic.latitude, |
| | | 280 |
| | | 200 |
| | | ), |
| | | orientation: { |
| | | // 指向 |
| | |
| | | }) |
| | | } |
| | | |
| | | if (height > 310 && height <= 370) { |
| | | if (height > 250 && height <= 350) { |
| | | global.viewer.camera.setView({ |
| | | destination: global.DC.Namespace.Cesium.Cartesian3.fromRadians( |
| | | global.viewer.camera.positionCartographic.longitude, |
| | | global.viewer.camera.positionCartographic.latitude, |
| | | 340 |
| | | 300 |
| | | ), |
| | | orientation: { |
| | | // 指向 |
| | |
| | | }) |
| | | } |
| | | |
| | | if (height > 370) { |
| | | if (height > 350) { |
| | | global.viewer.camera.setView({ |
| | | destination: global.DC.Namespace.Cesium.Cartesian3.fromRadians( |
| | | global.viewer.camera.positionCartographic.longitude, |
| | |
| | | tilesetLayer = new global.DC.TilesetLayer('tilesetLayer') |
| | | global.viewer.addLayer(tilesetLayer) |
| | | tileset = new global.DC.Tileset('/mx/tileset.json', { |
| | | luminanceAtZenith: 0.3, |
| | | luminanceAtZenith: 0.4, |
| | | // cullWithChildrenBounds: false, |
| | | // cullRequestsWhileMoving: false, |
| | | // skipLevelOfDetail: false, |
| | | shadows: global.DC.Namespace.Cesium.ShadowMode.DISABLED |
| | | }) |
| | | tilesetLayer.addOverlay(tileset) |
| | |
| | | global.viewer.on(global.DC.SceneEventType.CAMERA_CHANGED, that.mapCameraEvent) |
| | | tileset.off(global.DC.MouseEventType.CLICK, that.tilesetClick) |
| | | tilesetLayer.removeOverlay(tileset) |
| | | global.viewer.remove(tilesetLayer) |
| | | tilesetLayer.show = false |
| | | global.viewer.removeLayer(tilesetLayer) |
| | | tileset = null |
| | | tilesetLayer = null |
| | | tilesetLayer.show = false |
| | | that.createdLayers() |
| | | |
| | | baseMapLayer = global.viewer.imageryLayers.addImageryProvider(new global.DC.Namespace.Cesium.UrlTemplateImageryProvider({ |
| | |
| | | } |
| | | }) |
| | | // 最小 |
| | | global.viewer.scene.screenSpaceCameraController.minimumZoomDistance = 220 |
| | | global.viewer.scene.screenSpaceCameraController.minimumZoomDistance = 100 |
| | | // 最大 |
| | | global.viewer.scene.screenSpaceCameraController.maximumZoomDistance = 400 |
| | | // 视角旋转 |