From a152b54da732cd8279c8f291865d5c96d9e01364 Mon Sep 17 00:00:00 2001 From: zh <972939975@qq.com> Date: Thu, 3 Jul 2025 15:30:26 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=88=E5=B9=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Event/index.js | 5 +---- src/Global/MultiViewportMode/index.js | 9 ++++++++- src/In/index.js | 11 +++++++---- 3 files changed, 16 insertions(+), 9 deletions(-) diff --git a/src/Event/index.js b/src/Event/index.js index e423507..ca3987b 100644 --- a/src/Event/index.js +++ b/src/Event/index.js @@ -98,7 +98,7 @@ export default class MouseEvent { }, Cesium.ScreenSpaceEventType.WHEEL) } -getcartesian(movement) { + getcartesian(movement) { // if (movement.endPosition) { // movement.endPosition.y -= 2 // } @@ -125,9 +125,6 @@ getcartesian(movement) { cartesian = this.viewer.scene.globe.pick(ray, this.viewer.scene); } } - // console.log(cartesian) - // const updatedPositions = await Cesium.sampleTerrainMostDetailed(this.sdk.viewer.terrainProvider, Cesium.Cartographic.fromCartesian(cartesian, this.viewer.scene.globe.ellipsoid)); - // console.log(updatedPositions) return cartesian // return this.earth.czm.viewer.scene.pickPosition(position) } diff --git a/src/Global/MultiViewportMode/index.js b/src/Global/MultiViewportMode/index.js index 21a34f5..0d63e89 100644 --- a/src/Global/MultiViewportMode/index.js +++ b/src/Global/MultiViewportMode/index.js @@ -557,5 +557,12 @@ function setActiveViewer(v) { activeViewer = v } +function getSdk() { + return { + sdkP: sdk3D, + sdkD: sdk2D + } +} -export { on, off, syncData, syncEntities, syncDataSources, syncPrimitives, get2DView, get3DView, setActiveViewer } \ No newline at end of file + +export { on, off, syncData, syncEntities, syncDataSources, syncPrimitives, get2DView, get3DView, setActiveViewer, getSdk } \ No newline at end of file diff --git a/src/In/index.js b/src/In/index.js index 3cfd1e1..61fc475 100644 --- a/src/In/index.js +++ b/src/In/index.js @@ -64,12 +64,13 @@ import { open as mapxOpen, close as mapxClose } from '../Global/MapX' import { on as multiViewportModeOn, off as multiViewportModeOff, - get2DView + get2DView, + getSdk as getSdk2 } from '../Global/MultiViewportMode' import { MouseCoordinate } from '../Global/MouseCoordinate' import { MouseRightMenu } from '../Global/mouseRightMenu' import { dialog as ContourDialog } from '../Global/Contour' -import { on as SplitScreenOn, off as SplitScreenOff, setActiveId as SplitScreenSetActiveId } from '../Global/SplitScreen' +import { on as SplitScreenOn, off as SplitScreenOff, setActiveId as SplitScreenSetActiveId ,getSdk } from '../Global/SplitScreen' import LocateCurrent from '../Obj/Base/LocateCurrent' import { Clear as AnalysisClear } from '../Obj/Analysis/clear' @@ -299,7 +300,8 @@ if (!window.YJ) { multiViewportMode: { on: multiViewportModeOn, off: multiViewportModeOff, - get2DView + get2DView, + getSdk:getSdk2 }, MouseCoordinate, MouseRightMenu, @@ -331,7 +333,8 @@ if (!window.YJ) { splitScreen: { on: SplitScreenOn, off: SplitScreenOff, - setActiveId: SplitScreenSetActiveId + setActiveId: SplitScreenSetActiveId, + getSdk }, Contour: ContourDialog }, //测量