Browse Source

叠置分析测试数据,等后端修改

Bella 2 years ago
parent
commit
3e6d644e36
2 changed files with 13 additions and 14 deletions
  1. 8 8
      src/components/map/MapHolder.vue
  2. 5 6
      src/views/ComprehensiveAnalysis.vue

+ 8 - 8
src/components/map/MapHolder.vue

@@ -417,9 +417,9 @@ export default {
             // "?servertype=Street_Purplish_Blue&token=" +
             // systemConfig.token,
 
-          // url: "http://aimap.pudong.sh:5236/maps/rest/services/basemap-shanghai-gem-blue-sh2000/mapserver",
-          // tileSize: 512
-          systemConfig.blueBlackMap
+            // url: "http://aimap.pudong.sh:5236/maps/rest/services/basemap-shanghai-gem-blue-sh2000/mapserver",
+            // tileSize: 512
+            systemConfig.blueBlackMap,
         })
         .addTo(map2DViewer.map);
       // layer.setStyle({opacity:0,fillOpacity:0})
@@ -545,7 +545,7 @@ export default {
       }
     },
     addSinglePolygon(geometry, cid, color) {
-      console.log(geometry[2], "打印出第一个");
+      // console.log(geometry[2], "打印出第一个");
       let coordinates = null;
       // console.log(geometry[0], "判断是否为json格式");
       if (geometry[2] === "g") {
@@ -596,7 +596,7 @@ export default {
         polygon.on("click", (e) => {
           // console.log(e, "polygon");
           this.auditPopupShow = true;
-          console.log(e.latlng, "获取当前弹窗坐标111");
+          // console.log(e.latlng, "获取当前弹窗坐标111");
 
           this.popup = L.popup({ maxWidth: 700, maxHeight: 600 })
             .setLatLng(e.latlng)
@@ -621,7 +621,7 @@ export default {
     drawPoints(data) {
       this.setView(data.coord, 16);
       if (!map2DViewer.myLabels[`label_${data.id}`]) {
-        console.log("开始绘制点", data);
+        // console.log("开始绘制点", data);
         let point = L.marker(data.coord, {
           opacity: 1,
         }).addTo(map2DViewer.map);
@@ -630,7 +630,7 @@ export default {
     },
     drawLine(data, color) {
       if (!map2DViewer.myLabels[`label_${data.id}`]) {
-        console.log("开始绘制线", data);
+        // console.log("开始绘制线", data);
         let coordinates = JSON.parse(data.geojson).geometry.coordinates[0];
         let polyline = L.polyline(coordinates, {
           color: color,
@@ -672,7 +672,7 @@ export default {
       if (!map2DViewer.myLabels[`label_${data.id}`]) {
         console.log("开始绘制圆", data);
         let coordinates = JSON.parse(data.geojson).geometry.coordinates[0];
-        console.log(coordinates);
+        // console.log(coordinates);
         if ((coordinates.length = 2)) {
           let from = turf.point(coordinates[0].reverse());
           let to = turf.point(coordinates[1].reverse());

+ 5 - 6
src/views/ComprehensiveAnalysis.vue

@@ -1017,6 +1017,11 @@ export default {
     displayOverlayData(data) {
       if (data.c_dzfx_file) {
         // this.uploadBaseUrl + data.c_dzfx_file
+        // this.$Get(this.uploadBaseUrl + data.c_dzfx_file, "").then(
+        //   (response) => {
+        //     console.log(response, "response");
+        //   }
+        // );
         // 测试数据
         this.$Get("./static/json/test.json", "").then((response) => {
           if (response.features.length > 0) {
@@ -1026,12 +1031,6 @@ export default {
               this.readGeojson(geojson, data.id);
             });
           }
-          // if (res.features.length > 0) {
-          //   res.features.forEach((v) => {
-          //     let geojson = publicFun.standardGeojson(v.geometry.coordinates);
-          //     this.readGeojson(geojson);
-          //   });
-          // }
         });
       }
     },