From 0af4ecb9b2047b8ba6d00e891050cf2d68b829a6 Mon Sep 17 00:00:00 2001
From: Surpriseplus <845948745@qq.com>
Date: 星期六, 27 五月 2023 20:41:18 +0800
Subject: [PATCH] 代码提交

---
 src/components/mapsdk.vue |   38 +++++++++++++++++++++++++++-----------
 1 files changed, 27 insertions(+), 11 deletions(-)

diff --git a/src/components/mapsdk.vue b/src/components/mapsdk.vue
index 2677e44..c3663c4 100644
--- a/src/components/mapsdk.vue
+++ b/src/components/mapsdk.vue
@@ -78,13 +78,22 @@
               label-width="50px"
             >
               <el-form-item label="缁忓害:">
-                <el-input v-model="coordFrom.lon"></el-input>
+                <el-input
+                  v-model="coordFrom.lon"
+                  placeholder="璇疯緭鍏ョ粡搴�"
+                ></el-input>
               </el-form-item>
               <el-form-item label="绾害:">
-                <el-input v-model="coordFrom.lat"></el-input>
+                <el-input
+                  v-model="coordFrom.lat"
+                  placeholder="璇疯緭鍏ョ淮搴�"
+                ></el-input>
               </el-form-item>
               <el-form-item label="楂樺害:">
-                <el-input v-model="coordFrom.height"></el-input>
+                <el-input
+                  v-model="coordFrom.height"
+                  placeholder="璇疯緭鍏ラ珮搴�"
+                ></el-input>
               </el-form-item>
               <el-form-item>
                 <el-button
@@ -161,6 +170,7 @@
                 <el-input
                   style="width: 160px"
                   v-model="comprehensive.name"
+                  placeholder="璇疯緭鍏ュ湴鍚�...."
                 ></el-input>
               </el-form-item>
               <el-form-item>
@@ -738,9 +748,9 @@
         val: 50,
       },
       coordFrom: {
-        lon: 116.3911,
-        lat: 39.9115,
-        height: 100000,
+        lon: "",
+        lat: "",
+        height: "",
       },
       listData: {
         name: null,
@@ -843,16 +853,16 @@
     },
     async setModelInfoData(result) {
       var modelKey = 'id';
-      debugger
+
       var modelid;
       if (result.tileset) {
-        if (result.tileset.pubid > 0) {
+        if (result.tileset.pubid) {
 
           const data = await comprehensive_selectPubById({ id: result.tileset.pubid })
           if (data.code != 200) {
             return
           } else {
-            debugger
+
             modelKey = JSON.parse(data.result.json).modelid
           }
           if (!modelKey) {
@@ -988,7 +998,7 @@
         requestVertexNormals: true,
       };
       window.terrainLayer = sgworld.Creator.sfsterrainprovider("", option, "", true, "");
-
+      window.terrainFlag = 'MPT'
       window.elevationTool = new SmartEarth.ElevationTool(window.sgworld);
       elevationTool.setContourColor("#F1D487");
 
@@ -1194,6 +1204,12 @@
     },
     //瀹氫綅
     setCoordLocal() {
+      if (!this.coordFrom.lon) {
+        return this.$message('璇疯緭鍏ョ粡搴�');
+      }
+      if (!this.coordFrom.lat) {
+        return this.$message('璇疯緭鍏ョ含搴�');
+      }
       var lon = parseFloat(this.coordFrom.lon)
       var lat = parseFloat(this.coordFrom.lat)
       var height = parseFloat(this.coordFrom.height) == NaN ? parseFloat(this.coordFrom.height) : 100;
@@ -1201,7 +1217,7 @@
       var position = {
         X: lon,
         Y: lat,
-        Altitude: 2000,
+        Altitude: height,
       };
       if (this.imagePoint != null) {
         sgworld.Creator.DeleteObject(this.imagePoint);

--
Gitblit v1.9.3