This commit is contained in:
zh
2025-08-26 18:53:05 +08:00
parent 8287a00832
commit be1614b50b
2 changed files with 9 additions and 5 deletions

View File

@ -421,7 +421,10 @@ class GroundSvg extends Base {
}
set textFontSize(v) {
this.options.text.fontSize = v
this.text && (this.text.fontSize = v)
if(this.text) {
this.text.fontSize = v
this.text.pixelOffset = v
}
this._elms.textFontSize && this._elms.textFontSize.forEach((item) => {
item.value = v
})
@ -1532,7 +1535,7 @@ class GroundSvg extends Base {
text: that.options.text.value,
fontSize: that.options.text.fontSize,
color: that.options.text.color,
pixelOffset: that.options.text.pixelOffset,
pixelOffset: that.options.text.fontSize,
backgroundColor: that.options.text.backgroundColor,
lineColor: that.options.text.lineColor,
lineWidth: that.options.text.lineWidth,

View File

@ -1666,9 +1666,10 @@ class TrajectoryMotion extends Base {
if (!cartesian3) {
return
}
coordinates = _this.cartesian3Towgs84(cartesian3, viewer);
let pos84 = _this.cartesian3Towgs84(cartesian3, viewer);
coordinates = [pos84.lng, pos84.lat, pos84.alt + 1.8]
position = cartesian3
positionCamera = Cesium.Cartesian3.fromDegrees(coordinates.lng, coordinates.lat, coordinates.alt + 1.8)
positionCamera = Cesium.Cartesian3.fromDegrees(coordinates[0], coordinates[1], coordinates[2])
let positions_smooth = []
for (let i = 0; i <= 1000; i++) {
if ((i / 1000) > (distance / _this.distance)) {
@ -1791,7 +1792,7 @@ class TrajectoryMotion extends Base {
else {
if (_this.sdk.viewer.trackedEntity) {
_this.sdk.viewer.camera.setView({
destination: Cesium.Cartesian3.fromDegrees(coordinates.lng, coordinates.lat, _this.sdk.viewer.camera.positionCartographic.height),
destination: Cesium.Cartesian3.fromDegrees(coordinates[0], coordinates[1], _this.sdk.viewer.camera.positionCartographic.height),
orientation: {
heading: Cesium.Math.toRadians(-90),
pitch: 0,