From bcb686607ddff77f83b5e6d597f483b3d49e596e Mon Sep 17 00:00:00 2001
From: 少年 <1392120328@qq.com>
Date: 星期六, 20 一月 2024 21:26:31 +0800
Subject: [PATCH] youhua

---
 src/utils/map.js |   13 ++++++++++++-
 1 files changed, 12 insertions(+), 1 deletions(-)

diff --git a/src/utils/map.js b/src/utils/map.js
index 048a329..185498f 100644
--- a/src/utils/map.js
+++ b/src/utils/map.js
@@ -615,6 +615,10 @@
             }
             let nPickFeature = sgworld.Viewer.scene.pick(event.position);
             console.log(nPickFeature);
+            if (nPickFeature == undefined) {
+                window.flyPoint && Viewer.entities.remove(window.flyPoint);
+                window.flyPoint = undefined;
+            }
             // console.log(event.position);//灞忓箷浣嶇疆
             if (!nPickFeature || !nPickFeature.id) {
                 return
@@ -661,7 +665,7 @@
                 nPickFeature.primitive.image =
                     window.SmartEarthRootUrl + "Workers/image/point.png";
                 //鐐瑰嚮寮规(閮ㄤ欢銆佷紒涓氥�佺洃鎺�)
-                if (nPickFeature.id.tag) {
+                if (nPickFeature.id.tag || nPickFeature.id.show) {
                     let properties = nPickFeature.id.properties;
                     let propertyNames = nPickFeature.id.properties.propertyNames;
                     if (propertyNames.indexOf("鐩戞帶鍚�") !== -1) {
@@ -740,6 +744,13 @@
                             lon: lon,
                             lat: lat,
                         }
+                    } else if (propertyNames.includes("id")) {
+                        objdata = {
+                            POITYPE: "POINT",
+                            name: properties["_name"]._value,
+                            lat: properties["_lat"]._value,
+                            lon: properties["_lng"]._value,
+                        }
                     }
                     divPoint3 && divPoint3.deleteObject();
                     store.setPoplayerShowAction(false);

--
Gitblit v1.9.3