/** * 工具栏-视图 */ export default { methods: { // 截图 createScreenshot() { window.sgworld.Analysis.createScreenshot(); }, modelbbox(btn) { btn.checked = !btn.checked; var primitives = window.Viewer.scene.primitives; for (var i = 0; i < primitives.length; i++) { var primitive = primitives.get(i); if (typeof primitive.debugShowBoundingVolume != "undefined") { primitive.debugShowBoundingVolume = btn.checked; } } }, // 截图预览 createScreenshotView() { window.sgworld.Analysis.ScreenshotCompared("截图预览"); }, // 正北 north() { window.sgworld.Navigate.flyToPointsInterest({ destination: window.Viewer.camera.position, orientation: { heading: 0, pitch: window.Viewer.camera.pitch, roll: 0, }, }); }, // 俯瞰 overlook() { window.sgworld.Navigate.flyToPointsInterest({ destination: window.Viewer.camera.position, orientation: { heading: window.Viewer.camera.heading, pitch: Cesium.Math.toRadians(-90), roll: 0, }, }); }, // 最大化 maximum() { window.Viewer.fullscreenButton.viewModel.command(); }, // 状态栏 statusBar(btn) { btn.checked = !btn.checked; this.changeMapToolsVisible('statusbar'); }, positionButton(btn){ btn.checked = !btn.checked; this.changeMapToolsVisible('hidePositionBtn'); }, //导航控件 navigationBar(btn) { btn.checked = !btn.checked; this.changeNavBarVisible(); }, //比例尺控件 scaleBar(btn) { btn.checked = !btn.checked; this.changeScaleBarVisible(); }, timeLine(btn) { btn.checked = !btn.checked; Viewer.timeline.container.style.visibility = btn.checked ? "visible" : "hidden"; }, // 地形三角网 wireframe(btn) { btn.checked = !btn.checked; window.sgworld.wireframe = btn.checked; }, // 瓦片区块 tileCoordinates(btn) { btn.checked = !btn.checked; window.sgworld.tileCoordinates = btn.checked; }, }, };