From 78471471db6c266fa72fc8421590cb793279633f Mon Sep 17 00:00:00 2001
From: liuyg <376836862@qq.com>
Date: Tue, 15 Jun 2021 17:14:14 +0800
Subject: [PATCH] bug

---
 widgets/LeftNavigationBar/Widget.js |   19 +++++++++++++++++++
 1 files changed, 19 insertions(+), 0 deletions(-)

diff --git a/widgets/LeftNavigationBar/Widget.js b/widgets/LeftNavigationBar/Widget.js
index 7d9d3af..2dc7d4f 100644
--- a/widgets/LeftNavigationBar/Widget.js
+++ b/widgets/LeftNavigationBar/Widget.js
@@ -390,6 +390,7 @@
 							// console.log(obj.data.id, '--', obj.checked, obj); //得到当前点击的节点数据
 							// console.log(obj.checked); //得到当前节点的展开状态:open、close、normal
 							// console.log(obj.elem); //得到当前节点元素
+							var keyId = that.getUrlKeyId("serviceId");
 
 							if (obj.data.children && obj.data.children.length > 0) {
 
@@ -436,6 +437,7 @@
 											});
 										});
 									} else {
+
 										obj.data.children.forEach(item => {
 											$.ajax({
 												url: item.src + '/maps.json',
@@ -447,9 +449,18 @@
 														url: res[0].path,
 													}));
 													that[item.id].alpha = item.alpha
+
+													if (keyId && keyId != "") {
+														that[item.id].getViewableRectangle().then(function (rectangle) {
+															return that.map.camera.flyTo({
+																destination: rectangle
+															});
+														});
+													}
 												}
 											})
 										});
+
 
 									}
 
@@ -530,6 +541,14 @@
 													url: res[0].path,
 												}));
 												that[obj.data.id].alpha = obj.data.alpha
+
+												if (keyId && keyId != "") {
+													that[obj.data.id].getViewableRectangle().then(function (rectangle) {
+														return that.map.camera.flyTo({
+															destination: rectangle
+														});
+													});
+												}
 											}
 										})
 

--
Gitblit v1.9.3