Merge pull request 'dev-cbwu' (#8) from dev-cbwu into dev

Reviewed-on: #8
dev
WuChengbo 11 months ago
commit fbad4dba03

@ -2,7 +2,7 @@
* @Author: cbwu 504-wuchengbo@htsdfp.com
* @Date: 2024-03-07 14:15:35
* @LastEditors: cbwu
* @LastEditTime: 2024-04-15 16:00:27
* @LastEditTime: 2024-04-16 19:06:50
* @Description:
-->
<template>
@ -22,7 +22,7 @@ import {
import { initViewer, perfViewer, showNavigator } from '@/utils/map/sceneViewer'
import { flyToChina } from '@/utils/map/camera'
import CreatePolyline from '@/utils/map/draw/drawPolyline'
import {inputGeoJson} from "@/utils/DataIO.ts";
import { inputGeoJson } from '@/utils/DataIO.ts'
// import DrawPoint from '@/utils/map/draw/drawPoint'
import { DrawPolygon } from '@/utils/map/draw/drawPolygon'
const viewerDivRef = ref<HTMLDivElement>()
@ -67,12 +67,12 @@ onMounted(() => {
// window
window.viewer = viewer
inputGeoJson(viewer)
// inputGeoJson(viewer)
//
// const drawPolyline = new CreatePolyline(viewer,true,{})
// drawPolyline.start()
const drawPolygon = new DrawPolygon(viewer,true)
drawPolygon.start()
const drawPolyline = new CreatePolyline(viewer)
drawPolyline.start()
// const drawPolygon = new DrawPolygon(viewer)
// drawPolygon.start()
})
</script>

@ -2,10 +2,10 @@
* @Author: cbwu 504-wuchengbo@htsdfp.com
* @Date: 2024-04-13 10:36:06
* @LastEditors: cbwu
* @LastEditTime: 2024-04-13 11:14:53
* @LastEditTime: 2024-04-16 13:47:55
* @Description:
*/
import { Color, Cartesian2 } from 'cesium'
import { Color, Cartesian2, HeightReference } from 'cesium'
export interface EntityOptions {
id?: string
name?: string
@ -23,4 +23,5 @@ export interface EntityOptions {
image?: string //图片url
imageWidth?: number //图片宽
imageHeight?: number //图片高
heightReference?: HeightReference
}

@ -2,7 +2,7 @@
* @Author: cbwu 504-wuchengbo@htsdfp.com
* @Date: 2024-03-27 08:43:44
* @LastEditors: cbwu
* @LastEditTime: 2024-04-13 10:46:58
* @LastEditTime: 2024-04-22 16:19:27
* @Description: Polyline
*/
import {
@ -14,26 +14,22 @@ import {
Entity,
CallbackProperty,
PolylineDashMaterialProperty,
Cartesian2,
HeightReference,
} from 'cesium'
import { cartesian2ToCartesian3 } from '@/utils/map/coordinate'
import {
cartesian2ToCartesian3,
cartesian3ToWGS84,
} from '@/utils/map/coordinate'
// import { PointEntity, PolylineEntity } from '@/utils/map/geometry'
import { PolylineEntity } from '../geometry/polylineEntity'
import { PointEntity } from '@/utils/map/geometry/pointEntity'
import EditGeometry from '@/utils/map/draw/editGeometry'
import {getDistance} from "@/utils/map/geocomputation.ts";
import {Angle} from "@/utils/map/angle.ts";
import {TextLabel} from "@/utils/map/geometry/textLabel.ts";
type EntityOptions = {
id?: string
name?: string
show?: boolean
pixelSize?: number
color?: Color
fillColor?: Color
fill?: boolean
width?: number
outlineWidth?: number
}
import { getDistance } from '@/utils/map/geocomputation.ts'
import { Angle } from '@/utils/map/angle.ts'
import { TextLabel } from '@/utils/map/geometry/textLabel.ts'
import { EntityOptions } from '@/types/entityoptions.ts'
export default class CreatePolyline {
viewer: Viewer
handler: ScreenSpaceEventHandler
@ -51,6 +47,11 @@ export default class CreatePolyline {
totalDistance: number = 0
bLongClick: boolean = false
clickTimeout: any
altitudeOffset: number = 20 //相对高度
vDashLinePosition: Cartesian3[][] = [] //垂直辅助线坐标数组
// 存储第一次点击的信息
firstClickPosition: Cartesian2 | null = null
firstClickTime: number | null = null
// layer: CustomDataSource
defaultStyle: EntityOptions = {
// id: 'Polyline' + String(PolylineEntity.id),
@ -59,9 +60,13 @@ export default class CreatePolyline {
width: 2,
color: Color.GREEN,
}
constructor(viewer: Viewer, bMeasure: boolean=false,options?: EntityOptions) {
constructor(
viewer: Viewer,
bMeasure: boolean = false,
options?: EntityOptions,
) {
this.viewer = viewer
this.bMeasure = bMeasure;
this.bMeasure = bMeasure
this.handler = new ScreenSpaceEventHandler(this.viewer.scene.canvas)
this.polyline = null
this.trackingLine = null
@ -98,14 +103,13 @@ export default class CreatePolyline {
}
//左单击回调事件
private leftClickCallBack = (event: ScreenSpaceEventHandler.PositionedEvent) => {
const pickedObject = this.viewer.scene.pick(event.position)
if (pickedObject) {
//点击同一位置,返回
if (pickedObject.id.id === this.polyline?.controlPointsID[this.positions.length - 1])
return
}
const cartesian3 = cartesian2ToCartesian3(this.viewer, event.position)
private leftClickCallBack = (
event: ScreenSpaceEventHandler.PositionedEvent,
) => {
//根据屏幕坐标判断是否为同一点
if (this.isSamplePosition(event.position.clone())) return
let cartesian3 = cartesian2ToCartesian3(this.viewer, event.position)
if (cartesian3 != undefined) {
if (!this.polyline) {
this.polyline = new PolylineEntity(this.positions)
@ -113,29 +117,60 @@ export default class CreatePolyline {
this.viewer.entities.add(this.dashLine)
this.viewer.dataSources.add(this.polyline)
}
const oldPosition = cartesian3
//计算高度偏移后的新坐标
cartesian3 = this.calculateAltitudeOffsetPosition(
cartesian3,
this.altitudeOffset,
)
this.polyline.addPoint(cartesian3)
this.trackingLinePositions[0] = cartesian3
//垂直辅助线
const n = this.positions.length - 1
const ptArr = [oldPosition, cartesian3]
this.vDashLinePosition[n] = ptArr
this.viewer.entities.add(
this.createTrackingLine(this.vDashLinePosition[n], Color.WHITE),
)
//添加地表控制点
const groundControlPoint = new PointEntity(this.vDashLinePosition[n][0])
this.viewer.entities.add(groundControlPoint)
this.bMove = true
this.viewer.scene.requestRender() //刷新
// 计算2点距离
if(this.positions.length>=2 && this.bMeasure){
let distance = getDistance(this.positions[this.positions.length-1],this.positions[this.positions.length-2])
if (this.positions.length >= 2 && this.bMeasure) {
const distance = getDistance(
this.positions[this.positions.length - 1],
this.positions[this.positions.length - 2],
)
this.totalDistance += distance
// 计算2点方位角
let azimuth = Angle.getAzimuth(this.positions[this.positions.length-2],this.positions[this.positions.length-1])
const azimuth = Angle.getAzimuth(
this.positions[this.positions.length - 2],
this.positions[this.positions.length - 1],
)
// 计算2点的中间点
let midPoint = Cartesian3.midpoint(this.positions[this.positions.length-1],this.positions[this.positions.length-2],new Cartesian3())
const midPoint = Cartesian3.midpoint(
this.positions[this.positions.length - 1],
this.positions[this.positions.length - 2],
new Cartesian3(),
)
// 添加label
let labelText = `距离: ${distance.toFixed(2)}km, 方位角: ${azimuth}°`
new TextLabel(this.viewer, midPoint,labelText)
const labelText = `距离: ${distance.toFixed(2)}km, 方位角: ${azimuth}°`
new TextLabel(this.viewer, midPoint, labelText)
}
}
}
// 移动回调事件
private moveCallBack = (event: ScreenSpaceEventHandler.MotionEvent) => {
if (this.bMove) {
const cartesian3 = cartesian2ToCartesian3(this.viewer, event.endPosition)
let cartesian3 = cartesian2ToCartesian3(this.viewer, event.endPosition)
if (cartesian3 != undefined) {
//计算高度偏移后的新坐标
cartesian3 = this.calculateAltitudeOffsetPosition(
cartesian3,
this.altitudeOffset,
)
//更新追踪线坐标
this.trackingLinePositions[1] = cartesian3
if (!this.trackingLine) {
@ -150,7 +185,9 @@ export default class CreatePolyline {
}
}
// 左双击回调事件
private leftDoubleClickCallBack = (event: ScreenSpaceEventHandler.PositionedEvent,) => {
private leftDoubleClickCallBack = (
event: ScreenSpaceEventHandler.PositionedEvent,
) => {
if (!this.polyline) return
this.bMove = false
const cartesian3 = cartesian2ToCartesian3(this.viewer, event.position)
@ -161,12 +198,18 @@ export default class CreatePolyline {
}
}
if(this.bMeasure){
if (this.bMeasure) {
// 添加总距离label
new TextLabel(this.viewer,this.positions[this.positions.length-1],
`总距离: ${this.totalDistance.toFixed(2)}km`)
new TextLabel(
this.viewer,
this.positions[this.positions.length - 1],
`总距离: ${this.totalDistance.toFixed(2)}km`,
)
}
this.clearEvent()
console.log('end:' + this.positions.length.toString())
console.log(this.positions)
console.log(this.polyline.controlPointsID.length)
//结束绘制进入编辑模式
this.polyline.removeControlPoints()
const editTool = new EditGeometry(this.viewer, this.polyline.geometry!)
@ -187,8 +230,21 @@ export default class CreatePolyline {
this.handler.removeInputAction(ScreenSpaceEventType.MOUSE_MOVE)
this.handler.removeInputAction(ScreenSpaceEventType.LEFT_DOUBLE_CLICK)
}
//计算高度偏移后的坐标
calculateAltitudeOffsetPosition(
oldPosition: Cartesian3,
altitudeOffset: number,
): Cartesian3 {
const newGeoPosition = cartesian3ToWGS84(oldPosition)
newGeoPosition[2] = newGeoPosition[2] + altitudeOffset
return Cartesian3.fromDegrees(
newGeoPosition[0],
newGeoPosition[1],
newGeoPosition[2],
)
}
//创建追踪线
createTrackingLine(positions: Cartesian3[]) {
createTrackingLine(positions: Cartesian3[], color: Color = Color.GREEN) {
return new Entity({
polyline: {
positions: new CallbackProperty(() => {
@ -196,11 +252,35 @@ export default class CreatePolyline {
}, false),
width: 2,
material: new PolylineDashMaterialProperty({
color: Color.GREEN,
dashLength: 15, //短划线长度
color: color,
dashLength: 12, //短划线长度
}),
clampToGround: true,
// clampToGround: true,
},
})
}
//判断点击是否同一位置
isSamplePosition(clickPosition: Cartesian2) {
if (this.firstClickPosition) {
const dist = Cartesian2.distance(this.firstClickPosition, clickPosition)
if (dist <= 3) {
console.log('********click the same point0')
return true
}
}
this.firstClickPosition = clickPosition
// const pickedObject = this.viewer.scene.pick(clickPosition)
// if (pickedObject) {
// //点击同一位置,返回
// if (
// pickedObject.id.id ===
// this.polyline?.controlPointsID[this.positions.length - 1]
// ) {
// console.log('********click the same point')
// return
// }
// }
return false
}
}

@ -2,7 +2,7 @@
* @Author: cbwu 504-wuchengbo@htsdfp.com
* @Date: 2024-03-27 11:06:45
* @LastEditors: cbwu
* @LastEditTime: 2024-04-13 10:47:09
* @LastEditTime: 2024-04-22 16:49:15
* @Description:
*/
import {
@ -16,6 +16,10 @@ import {
Entity,
ConstantPositionProperty,
defined,
CallbackProperty,
PolylineDashMaterialProperty,
Color,
Cartographic,
} from 'cesium'
import { cartesian2ToCartesian3 } from '@/utils/map/coordinate'
import { getClosestPoint, isOnLineSegment } from '@/utils/map/geocomputation'
@ -26,8 +30,12 @@ export default class EditGeometry {
geometry: Entity //要编辑的几何对象
oldPositions: Cartesian3[] = [] //存储未修改前的坐标
positions: Cartesian3[] = [] //要编辑的几个对象坐标
controlPointsID: string[] = []
controlPoint: PointEntity | null = null
controlPointsID: string[] = [] //节点控制点ID数组
groundPointsID: string[] = [] //地表控制点ID数组
groundDashLineID: string[] = [] //垂直辅助线ID数组
groundDashLinesPosition: Cartesian3[][] = [] //垂直辅助线坐标数组
heightPoint: PointEntity | null = null //高度控制点
groundPoint: PointEntity | null = null //地表控制点
clickedGeometry: Entity | null = null
clickDownPosition: Cartesian3 | null = null
moveSelectedPoint: PointEntity | null = null
@ -46,6 +54,13 @@ export default class EditGeometry {
// 创建控制点
this.positions.forEach((value, index) => {
this.createPoint(value, index)
//地表点
const groundPosition = this.calculateGroundPosition(value)
this.createGroundPoint(value, index)
//垂直辅助线
const ptArr = [value, groundPosition]
this.groundDashLinesPosition[index] = ptArr
this.createGroundDashLine(this.groundDashLinesPosition[index], index)
})
}
public start() {
@ -86,7 +101,7 @@ export default class EditGeometry {
) => {
// 清除可能已经设置的单击定时器
clearTimeout(this.clickTimeout)
// 判断是不是长按
// 判断是不是长按(100ms)
this.clickTimeout = setTimeout(() => {
this.bLongClick = true
}, 100)
@ -111,8 +126,14 @@ export default class EditGeometry {
// 点中控制点
if (pickedObject.id.point instanceof PointGraphics) {
console.log('You clicked a point entity.')
this.controlPoint = pickedObject.id
console.log(this.controlPoint?.subId)
if (pickedObject.id.point.type === 0) {
console.log('You clicked a HeightPoint entity.')
this.heightPoint = pickedObject.id
} else if (pickedObject.id.point.type === 1) {
console.log('You clicked a GroundPoint entity.')
this.groundPoint = pickedObject.id
}
// console.log(this.heightPoint?.subId)
this.bDrag = true
this.forbidDrawWorld(true)
}
@ -134,7 +155,7 @@ export default class EditGeometry {
) {
this.moveSelectedPoint = pickedObject.id
this.moveSelectedPoint!.point!.pixelSize = new ConstantProperty(
this.moveSelectedPoint!.options.pixelSize! + 2,
this.moveSelectedPoint!.options.pixelSize! + 1,
)
// console.log(this.moveSelectedPoint)
}
@ -144,19 +165,19 @@ export default class EditGeometry {
// 离开控制点恢复原始大小
if (this.moveSelectedPoint) {
this.moveSelectedPoint!.point!.pixelSize = new ConstantProperty(
this.moveSelectedPoint!.options.pixelSize! - 2,
this.moveSelectedPoint!.options.pixelSize! - 1,
)
this.moveSelectedPoint = null
this.viewer.scene.requestRender() //刷新
}
}
if (!this.controlPoint || !this.bDrag) return
if (!this.heightPoint || !this.bDrag) return
console.log('************************left down')
const cartesian3 = cartesian2ToCartesian3(this.viewer, event.endPosition)
if (cartesian3) {
// 修改节点坐标
this.modifyPoint(cartesian3, this.controlPoint.subId)
this.modifyPoint(cartesian3, this.heightPoint.subId)
// this.geometry?.modifyPoint(cartesian3, this.controlPoint.subId)
this.viewer.scene.requestRender() //刷新
}
@ -230,10 +251,10 @@ export default class EditGeometry {
// 修改线坐标
this.positions.splice(index, 1, pos)
// 修改控制点坐标
this.controlPoint!.position = new ConstantPositionProperty(pos)
this.heightPoint!.position = new ConstantPositionProperty(pos)
}
/**
*
*
* @param pos
* @param index ,0
*/
@ -246,4 +267,48 @@ export default class EditGeometry {
this.controlPointsID.splice(index, 0, point.id)
// }
}
/**
*
* @param pos
* @param index ,0
*/
createGroundPoint(pos: Cartesian3, index: number) {
const point = new PointEntity(pos)
point.parent = this.geometry
point.subId = index
point.type = 1
this.geometry.entityCollection.add(point)
this.groundPointsID.splice(index, 0, point.id)
}
/**
* 线
* @param pos 线
* @param index ,0
*/
createGroundDashLine(positions: Cartesian3[], index: number) {
const vDashLine = new Entity({
polyline: {
positions: new CallbackProperty(() => {
return positions
}, false),
width: 2,
material: new PolylineDashMaterialProperty({
color: Color.WHITE,
dashLength: 12, //短划线长度
}),
},
})
this.groundDashLineID.splice(index, 0, vDashLine.id)
this.geometry.entityCollection.add(vDashLine)
}
//获取地表坐标
calculateGroundPosition(pos: Cartesian3) {
// 输入的当前点的笛卡尔坐标
const cartographic = Cartographic.fromCartesian(pos)
// 经度、纬度不变,将地面高度加上需要上升的距离, 假设垂直升高1000米
cartographic.height -= cartographic.height
// 最后使用Cesium.Cartographic.toCartesian将刚才得到的Cartographic对象转换为笛卡尔坐标
return Cartographic.toCartesian(cartographic)
}
}

@ -2,7 +2,7 @@
* @Author: cbwu 504-wuchengbo@htsdfp.com
* @Date: 2024-03-28 16:22:58
* @LastEditors: cbwu
* @LastEditTime: 2024-04-13 10:45:37
* @LastEditTime: 2024-04-22 11:32:00
* @Description:
*/
import {
@ -41,7 +41,11 @@ export abstract class BaseGeometry extends CustomDataSource {
* @param bAddControlPoint
* @bAddControlPoint
*/
public addPoint(pos: Cartesian3, index: number = -1, bAddControlPoint: boolean = true,) {
public addPoint(
pos: Cartesian3,
index: number = -1,
bAddControlPoint: boolean = true,
) {
if (index === -1) {
//插入尾部
this.positions.push(pos)

@ -2,15 +2,23 @@
* @Author: cbwu 504-wuchengbo@htsdfp.com
* @Date: 2024-03-28 16:35:33
* @LastEditors: cbwu
* @LastEditTime: 2024-04-13 11:15:48
* @LastEditTime: 2024-04-16 13:57:15
* @Description:
*/
import { Entity, Cartesian3, Color, PointGraphics, LabelGraphics } from 'cesium'
import {
Entity,
Cartesian3,
Color,
PointGraphics,
LabelGraphics,
HeightReference,
} from 'cesium'
import { EntityOptions } from '@/types/entityoptions'
// 点
class PointEntity extends Entity {
static ID: number = 0
public subId: number = 0 //用于作为其他几何体的控制点时标记节点号
public type: number = 0 //用于判断是线上节点(0)还是地表控制点(1)
options: EntityOptions = {
id: 'Point' + String(PointEntity.ID),
name: 'Point' + String(PointEntity.ID + 1),
@ -19,6 +27,7 @@ class PointEntity extends Entity {
color: Color.WHITE,
outlineColor: Color.GREEN,
outlineWidth: 0,
// heightReference: HeightReference.NONE,
}
constructor(position: Cartesian3, options?: EntityOptions) {
super({
@ -31,6 +40,8 @@ class PointEntity extends Entity {
color: this.options.color,
outlineColor: this.options.outlineColor,
outlineWidth: this.options.outlineWidth,
disableDepthTestDistance: 50000,
// heightReference: this.options.heightReference,
})
// 标注对象
this.label = new LabelGraphics({

@ -2,10 +2,16 @@
* @Author: cbwu 504-wuchengbo@htsdfp.com
* @Date: 2024-03-28 16:49:02
* @LastEditors: cbwu
* @LastEditTime: 2024-04-13 10:45:17
* @LastEditTime: 2024-04-16 11:12:08
* @Description: Polyline
*/
import { Entity, Cartesian3, Color, CallbackProperty } from 'cesium'
import {
Entity,
Cartesian3,
Color,
CallbackProperty,
PolylineDashMaterialProperty,
} from 'cesium'
import { BaseGeometry } from './baseGeometry'
import { EntityOptions } from '@/types/entityoptions'
export class PolylineEntity extends BaseGeometry {
@ -35,6 +41,10 @@ export class PolylineEntity extends BaseGeometry {
show: this.options.show,
width: this.options.width,
material: this.options.color,
// depthFailMaterial: new PolylineDashMaterialProperty({
// color: Color.GREEN,
// dashLength: 15, //短划线长度
// }),
},
})
this.entities.add(this.geometry)

@ -1,4 +1,20 @@
import {Cartesian3, Entity, Color, Viewer, Cartesian2, HorizontalOrigin, VerticalOrigin, HeightReference} from "cesium";
/*
* @Author: cbwu 504-wuchengbo@htsdfp.com
* @Date: 2024-04-16 18:59:56
* @LastEditors: cbwu
* @LastEditTime: 2024-04-22 09:11:33
* @Description:
*/
import {
Cartesian3,
Entity,
Color,
Viewer,
Cartesian2,
HorizontalOrigin,
VerticalOrigin,
HeightReference,
} from 'cesium'
/**
@ -6,18 +22,18 @@ import {Cartesian3, Entity, Color, Viewer, Cartesian2, HorizontalOrigin, Vertica
Zhaipeixiu
*/
export type textLabelOptions = {
showBackground?: boolean, //显示背景
backgroundColor?: Color, //背景色
backgroundPadding?: any, //padding值
fillColor: Color,
horizontalOrigin?: any, //水平对齐方式
verticalOrigin?: any, //竖直对齐方式
outlineColor?: any,
showBackground?: boolean //显示背景
backgroundColor?: Color //背景色
backgroundPadding?: any //padding值
fillColor: Color
horizontalOrigin?: any //水平对齐方式
verticalOrigin?: any //竖直对齐方式
outlineColor?: any
outlineWidth?: any
}
export class TextLabel{
_viewer: Viewer|undefined = undefined
export class TextLabel {
_viewer: Viewer | undefined = undefined
_defaultStyle: textLabelOptions = {
showBackground: true, //显示背景
backgroundColor: Color.BLACK, //背景色
@ -25,22 +41,27 @@ export class TextLabel{
fillColor: Color.WHITE,
outlineColor: Color.WHITESMOKE,
outlineWidth: 1.0,
horizontalOrigin: HorizontalOrigin.CENTER,//对齐方式
horizontalOrigin: HorizontalOrigin.CENTER, //对齐方式
verticalOrigin: VerticalOrigin.CENTER,
}
_cesiumLabel: Entity|undefined = undefined
_cesiumLabel: Entity | undefined = undefined
// 构造函数新建label并显示
constructor(viewer: Viewer, position: Cartesian3, text: string, options?: textLabelOptions) {
constructor(
viewer: Viewer,
position: Cartesian3,
text: string,
options?: textLabelOptions,
) {
this._viewer = viewer
this._defaultStyle = {...this._defaultStyle, ...options}
this._defaultStyle = { ...this._defaultStyle, ...options }
this._cesiumLabel = new Entity({
position: position,
name: 'default',
label: {
text: text,
scale: .6,
scale: 0.6,
pixelOffset: new Cartesian2(20, -20),
showBackground: this._defaultStyle.showBackground, //显示背景
backgroundColor: this._defaultStyle.backgroundColor, //背景色
@ -50,15 +71,15 @@ export class TextLabel{
outlineWidth: this._defaultStyle.outlineWidth,
horizontalOrigin: this._defaultStyle.horizontalOrigin, //对齐方式
verticalOrigin: this._defaultStyle.verticalOrigin,
heightReference: HeightReference.CLAMP_TO_GROUND
}
heightReference: HeightReference.CLAMP_TO_GROUND,
},
})
this._viewer.entities.add(this._cesiumLabel)
}
//移除label
public remove(){
if(this._cesiumLabel !== undefined && this._viewer!==null)
public remove() {
if (this._cesiumLabel !== undefined && this._viewer !== null)
this._viewer.entities.remove(this._cesiumLabel)
}
}

@ -2,7 +2,7 @@
* @Author: cbwu 504-wuchengbo@htsdfp.com
* @Date: 2024-03-13 09:32:21
* @LastEditors: cbwu
* @LastEditTime: 2024-04-13 10:49:06
* @LastEditTime: 2024-04-16 10:58:25
* @Description:
*/
// Viewer初始化
@ -53,7 +53,7 @@ function initViewer(container: string | Element): Viewer {
const creditContainer = viewer.cesiumWidget.creditContainer as HTMLDivElement
creditContainer.style.display = 'none'
// 开启深度检测
viewer.scene.globe.depthTestAgainstTerrain = false
viewer.scene.globe.depthTestAgainstTerrain = true
// 水雾特效
viewer.scene.globe.showGroundAtmosphere = true
// 设置更高的缩放惯性以使缩放操作更平滑

Loading…
Cancel
Save