1
0

2 Commits 2614afb788 ... 70bee9f35a

Autor SHA1 Nachricht Datum
  付宇航 70bee9f35a Merge branch 'master' of http://62.234.223.238:3000/wangzhe/screen-demo vor 8 Monaten
  付宇航 6b1b1f1298 补丁 vor 8 Monaten
1 geänderte Dateien mit 31 neuen und 31 gelöschten Zeilen
  1. 31 31
      screen-demo/src/views/templateInstance.vue

+ 31 - 31
screen-demo/src/views/templateInstance.vue

@@ -1754,40 +1754,40 @@ export default {
           {},
           {},
           "post"
-      ).then(() => {
-        // this.markPoints = res.data;
+      ).then((res) => {
+        this.markPoints = res.data;
         // 数据拟真 先写死 后期维护一个计算聚合点位的算法函数
         // 添加打点
         if (this.map) {
-          setTimeout(() => {
-            const data1 = [
-              { longitude: 116.05, latitude: 39.7, count: 50 },
-              { longitude: 116.39, latitude: 39.8, count: 113 },
-              { longitude: 116.53, latitude: 39.99, count: 88 },
-            ]
-            const data2 = [
-              { longitude: 116.01, latitude: 39.5, count: 12 },
-              { longitude: 116.12, latitude: 39.95, count: 16 },
-              { longitude: 116.23, latitude: 39.6, count: 6 },
-              { longitude: 116.34, latitude: 39.85, count: 6 },
-              { longitude: 116.45, latitude: 39.7, count: 3 },
-              { longitude: 116.56, latitude: 39.75, count: 12 },
-              { longitude: 116.67, latitude: 39.98, count: 3 },
-              { longitude: 116.78, latitude: 39.89, count: 12 }
-            ]
-            this.lcvs = new CTMapOl.extend.LayeredClusterViewShed(this.map.map, [
-              { data: this.transformProj(data1), maxZoom: 10, onClick: data => { console.log(data) } },
-              { data: this.transformProj(data2), minZoom: 10, maxZoom: 12, onClick: data => { console.log(data) } },
-              { data: this.transformProj(makeRandomData(3000)),minZoom: 12, onClick: data => { console.log(data) }}
-            ], {
-              minViewShed: 12,
-            })
-          })
-          // if (this.mapType === "3D") {
-          //   this.addPoint3D(this.map);
-          // } else {
-          //   this.addPoint(this.map.map);
-          // }
+          // setTimeout(() => {
+          //   const data1 = [
+          //     { longitude: 116.05, latitude: 39.7, count: 50 },
+          //     { longitude: 116.39, latitude: 39.8, count: 113 },
+          //     { longitude: 116.53, latitude: 39.99, count: 88 },
+          //   ]
+          //   const data2 = [
+          //     { longitude: 116.01, latitude: 39.5, count: 12 },
+          //     { longitude: 116.12, latitude: 39.95, count: 16 },
+          //     { longitude: 116.23, latitude: 39.6, count: 6 },
+          //     { longitude: 116.34, latitude: 39.85, count: 6 },
+          //     { longitude: 116.45, latitude: 39.7, count: 3 },
+          //     { longitude: 116.56, latitude: 39.75, count: 12 },
+          //     { longitude: 116.67, latitude: 39.98, count: 3 },
+          //     { longitude: 116.78, latitude: 39.89, count: 12 }
+          //   ]
+          //   this.lcvs = new CTMapOl.extend.LayeredClusterViewShed(this.map.map, [
+          //     { data: this.transformProj(data1), maxZoom: 10, onClick: data => { console.log(data) } },
+          //     { data: this.transformProj(data2), minZoom: 10, maxZoom: 12, onClick: data => { console.log(data) } },
+          //     { data: this.transformProj(makeRandomData(3000)),minZoom: 12, onClick: data => { console.log(data) }}
+          //   ], {
+          //     minViewShed: 12,
+          //   })
+          // })
+          if (this.mapType === "3D") {
+            this.addPoint3D(this.map);
+          } else {
+            this.addPoint(this.map.map);
+          }
         }
       });
       // 添加打点