From 783de5cb7aa397802df0fd322cd5dad66e0ba3e6 Mon Sep 17 00:00:00 2001 From: zh <972939975@qq.com> Date: Tue, 23 Sep 2025 14:36:57 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Obj/Base/PolyhedronObject/index.js | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/Obj/Base/PolyhedronObject/index.js b/src/Obj/Base/PolyhedronObject/index.js index 4f1622a..8a3305e 100644 --- a/src/Obj/Base/PolyhedronObject/index.js +++ b/src/Obj/Base/PolyhedronObject/index.js @@ -126,12 +126,7 @@ class PolyhedronObject extends Base { positions[0].push([that.options.positions[0].lng, that.options.positions[0].lat]) let polygon = turf.polygon(positions); let centroid = turf.pointOnFeature(polygon); - if (!that.options.label.position) { - that.options.label.position = { lng: centroid.geometry.coordinates[0], lat: centroid.geometry.coordinates[1], alt: that.options.extrudedHeight + that.options.height } - } - else { - that.options.label.position.alt = that.options.extrudedHeight + that.options.height - } + that.options.label.position = { lng: centroid.geometry.coordinates[0], lat: centroid.geometry.coordinates[1], alt: that.options.extrudedHeight + that.options.height } // 标签 that.label = new LabelObject(that.sdk, { id: that.options.id,