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 }, //测量