Browse Source

疑点筛查进入综合分析默认勾选预设模型对应图层

Bella 2 years ago
parent
commit
152462b2ff
3 changed files with 355 additions and 151 deletions
  1. 3 3
      public/static/config/config.js
  2. 7 13
      src/components/map/MapHolder.vue
  3. 345 135
      src/views/ComprehensiveAnalysis.vue

+ 3 - 3
public/static/config/config.js

@@ -9,8 +9,8 @@ var systemConfig = {
   lonCorrectParams:0.1915,
   assetsUrl: "http://localhost:2013",
   mapViewer: {
-    center: [31.105589678244445, 121.72894516017521],
-    zoom: 10,
+    center: [31.095589678244445, 121.72894516017521],
+    zoom: 6,
   },
   // 暂时无法使用
   // token: "65463DEE-620A-0ED5-2385-17ECD07CD351", //公共地图资源token
@@ -47,7 +47,7 @@ var myLabelNameMap = new Map();
 
 // 存储各镇域中心区域位置
 var townLocationMap = new Map();
-townLocationMap.set("全部", [31.105589678244445, 121.72894516017521]);
+townLocationMap.set("全部", [31.105589678244445, 121.67894516017521]);
 
 // 各镇域几何体 -- 方便定位
 var townPolygonMap = new Map();

+ 7 - 13
src/components/map/MapHolder.vue

@@ -600,9 +600,9 @@ export default {
 
       map2DViewer.map = L.map("map2DViewer", {
         crs: crs,
-        zoom: 2,
-        minZoom: 1,
-        maxZoom: 6,
+        zoom: 0,
+        minZoom: 0,
+        maxZoom: 8,
         attributionControl: false,
         zoomControl: false,
         // preferCanvas: true,
@@ -617,11 +617,11 @@ export default {
           // systemConfig.mapService +
           // "?servertype=Street_Purplish_Blue&token=" +
           // systemConfig.token,
-          url: "http://aimap.pudong.sh:5236/zjmap/reproduction-service/maps/rest/services/sat-2018s2/proxy?AccessKey=lUaEMxqqhZKLSImGuP/Ergx47orYVyIqHVgxfyGpIurKAy9kdq5uU1cWuTuIXeOM",
+          // url: "http://aimap.pudong.sh:5236/zjmap/reproduction-service/maps/rest/services/sat-2018s2/proxy?AccessKey=lUaEMxqqhZKLSImGuP/Ergx47orYVyIqHVgxfyGpIurKAy9kdq5uU1cWuTuIXeOM",
           // http://aimap.pudong.sh:5236/zjmap/reproduction-service/maps/rest/services/sat-2019s4/proxy?AccessKey=lUaEMxqqhZKLSImGuP/Ergx47orYVyIqHVgxfyGpIurKAy9kdq5uU1cWuTuIXeOM
           // url: "http://aimap.pudong.sh:5236/maps/rest/services/basemap-shanghai-gem-blue-sh2000/mapserver",
           tileSize: 512,
-          // systemConfig.blueBlackMap,
+          url:systemConfig.blueBlackMap,
         })
         .addTo(map2DViewer.map);
       // layer.setStyle({opacity:0,fillOpacity:0})
@@ -690,6 +690,7 @@ export default {
         this.getJSonDataToStreet("", "");
         // 切换到首页时需定位到当前图层
         if (this.$store.state.homeSpecialTown === "全部") {
+          // map2DViewer.map.fitBounds(map2DViewer.groups["浦东新区_polygon"].getBounds())
           this.setView(
             townLocationMap.get(this.$store.state.homeSpecialTown),
             10
@@ -708,7 +709,7 @@ export default {
       }
     },
     setView: function (coord, zoom) {
-      coord = publicFun.latLngsCorrection(coord);
+      // coord = publicFun.latLngsCorrection(coord);
       let center = L.latLng(coord[0], coord[1]);
       map2DViewer.map.setView(center, zoom);
     },
@@ -729,13 +730,6 @@ export default {
       }).addTo(map2DViewer.groups["浦东新区_polygon"]);
 
       center = JSON.parse(JSON.stringify(center)).geometry.coordinates;
-      // center = publicFun.latLngsCorrection(center)
-      // 坐标偏移矫正
-      // center[0] -= 0.1915;
-      // center = coordinate.wgs84_to_shcj(center[0],center[1]);
-      // center = this.w84Proj4ToShanghai(center);
-      // console.log("center",center);
-
       center.reverse();
       // 坐标
       townLocationMap.set(name, center);

File diff suppressed because it is too large
+ 345 - 135
src/views/ComprehensiveAnalysis.vue


Some files were not shown because too many files changed in this diff