From c0ff61d066a9f65aa0cdbeb1e10a249763f1e966 Mon Sep 17 00:00:00 2001
From: yxl <584911253@qq.com>
Date: 星期四, 02 一月 2025 09:58:41 +0800
Subject: [PATCH] 最新代码提交

---
 src/assets/js/mapSetFunc.js |   56 +++++++++++++++++++++++++-------------------------------
 1 files changed, 25 insertions(+), 31 deletions(-)

diff --git a/src/assets/js/mapSetFunc.js b/src/assets/js/mapSetFunc.js
index 535b587..34152f7 100644
--- a/src/assets/js/mapSetFunc.js
+++ b/src/assets/js/mapSetFunc.js
@@ -153,37 +153,31 @@
   },
 
   creatPoiMap(res) {
-    const poi = res.data;
-    // const label = earthCtrl.factory.createLabel({
-    //   lon: poi._x,
-    //   lat: poi._y,
-    //   text: this.getName(poi),
-    //   alt: 150,
-    //   image: SmartEarthRootUrl + "Workers/image/fighter.png",
-    //   // 鏂囨湰鍋忕Щ閲�
-    //   pixelOffset: new SmartEarth.Cesium.Cartesian2(0, -50),
-    //   // 鍥剧墖鍋忕Щ閲�
-    //   iPixelOffset: new SmartEarth.Cesium.Cartesian2(0, -20)
-    // });
-    const label = earthCtrl.factory.createLabel({
-      name: "鍒涘缓鏂囨湰",
-      id: earthCtrl.factory.createUUID(),
-      text: this.getName(poi),
-      font: "22pt monospace",
-      outlineWidth: 2,
-      fillColor: SmartEarth.Cesium.Color.YELLOW,
-      lon: poi._x,
-      lat: poi._y,
-      alt: poi.height ? poi.height + 10 : 100,
-      iDistanceDisplayCondition: (100, 3000)
-    });
-    setTimeout(() => {
-      this.setEntityTitlesChangeColor(poi.seid);
-    }, 200);
-    earthCtrl.userScene.flyTo(label);
-    this.layerList.push({
-      layer: label,
-      func: res.func
+    res.data.forEach((poi,index) => {
+      // const poi = res.data[0];
+      console.log('poi------', poi)
+      const label = earthCtrl.factory.createLabel({
+        name: "鍒涘缓鏂囨湰",
+        id: earthCtrl.factory.createUUID(),
+        text: poi.name,//this.getName(poi),
+        font: "22pt monospace",
+        outlineWidth: 2,
+        fillColor: SmartEarth.Cesium.Color.YELLOW,
+        lon: poi.lontitude,
+        lat: poi.lattitude,
+        alt: poi.height ? poi.height + 10 : 100,
+        iDistanceDisplayCondition: (100, 3000)
+      });
+      setTimeout(() => {
+        this.setEntityTitlesChangeColor(poi.seid);
+      }, 200);
+      if (index == 0) {
+        earthCtrl.userScene.flyTo(label);
+      }
+      this.layerList.push({
+        layer: label,
+        func: res.func
+      });
     });
   },
   setEntityTitlesChangeColor(res) {

--
Gitblit v1.9.3