From 5f6211a01d5fb0847944817fd85e6a9512f96381 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A4=8F=E5=A4=A7=E8=83=86?= <1101282782@qq.com> Date: Fri, 22 Aug 2025 17:36:57 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=87=E6=9C=AC=E6=A1=86=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E6=96=87=E5=AD=97=E8=B6=85=E5=87=BA=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Obj/Base/TextBox/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Obj/Base/TextBox/index.js b/src/Obj/Base/TextBox/index.js index 5e5697b..0179243 100644 --- a/src/Obj/Base/TextBox/index.js +++ b/src/Obj/Base/TextBox/index.js @@ -53,7 +53,7 @@ class TextBox extends Base { // 配置CSS样式和内容结构 viewer.cesiumWidget.container.appendChild(dom); - let posi = Cesium.Cartesian3.fromDegrees(that.options.position.lng, that.options.position.lat, that.options.position.alt) + let posi = Cesium.Cartesian3.fromDegrees(that.options.position.lng.toFixed(4), that.options.position.lat.toFixed(4), that.options.position.alt.toFixed(4)) that.handler = function () { const position = Cesium.SceneTransforms.wgs84ToWindowCoordinates( @@ -85,7 +85,7 @@ class TextBox extends Base { lat: latitude, alt: cartographic.height } - let posi = Cesium.Cartesian3.fromDegrees(longitude, latitude, cartographic.height) + let posi = Cesium.Cartesian3.fromDegrees(longitude.toFixed(4), latitude.toFixed(4), cartographic.height.toFixed(4)) that.handler = function () { const position = Cesium.SceneTransforms.wgs84ToWindowCoordinates(