Преглед изворни кода

交通流向撒点数据更新

yang1998 пре 5 дана
родитељ
комит
9517b1457e
2 измењених фајлова са 7654 додато и 39 уклоњено
  1. 78 30
      src/utils/map/baseMethod.js
  2. 7576 9
      src/utils/mapService/local-data.js

+ 78 - 30
src/utils/map/baseMethod.js

@@ -1006,7 +1006,8 @@ export function handleJtlxPoints(bol){
     addMultiImagePoints(
       'jtlx-points',
       {
-        data: analogData["渡口"].features
+        // data: analogData["渡口"].features
+        data: analogData["客运码头"].features
           .filter((el) => el.properties.POINT_X !== null && el.properties.POINT_Y !== null)
           .map((item) => {
             return {
@@ -1021,28 +1022,29 @@ export function handleJtlxPoints(bol){
       // new URL(`@/assets/img/pinpoint(1).png`, import.meta.url).href,
       "images/sadian/码头.png",
     );
+    // addMultiImagePoints(
+    //   'jtlx-points',
+    //   {
+    //     data: analogData["海关"].features
+    //       .filter((el) => el.properties.shanghai_x !== null && el.properties.shanghai_y !== null)
+    //       .map((item) => {
+    //         return {
+    //           attributes: {
+    //             ...item.properties,
+    //           },
+    //           mapx: item.properties.shanghai_x,
+    //           mapy: item.properties.shanghai_y,
+    //         };
+    //       }).slice(0,3),
+    //   },
+    //   // new URL(`@/assets/img/pinpoint(1).png`, import.meta.url).href,
+    //   "images/sadian/海关.png",
+    // );
     addMultiImagePoints(
       'jtlx-points',
       {
-        data: analogData["海关"].features
-          .filter((el) => el.properties.shanghai_x !== null && el.properties.shanghai_y !== null)
-          .map((item) => {
-            return {
-              attributes: {
-                ...item.properties,
-              },
-              mapx: item.properties.shanghai_x,
-              mapy: item.properties.shanghai_y,
-            };
-          }),
-      },
-      // new URL(`@/assets/img/pinpoint(1).png`, import.meta.url).href,
-      "images/sadian/海关.png",
-    );
-    addMultiImagePoints(
-      'jtlx-points',
-      {
-        data: analogData["火车站"].features
+        // data: analogData["火车站"].features
+        data: analogData["火车站新"].features
           .filter((el) => el.geometry !== null)
           .map((item) => {
             return {
@@ -1075,41 +1077,87 @@ export function handleJtlxPoints(bol){
       // new URL(`@/assets/img/pinpoint(1).png`, import.meta.url).href,
       "images/sadian/机场.png",
     );
+    // addMultiImagePoints(
+    //   'jtlx-points',
+    //   {
+    //     data: analogData["汽车站"].features
+    //       .filter((el) => el.geometry !== null)
+    //       .map((item) => {
+    //         return {
+    //           attributes: {
+    //             ...item.properties,
+    //           },
+    //           mapx: item.geometry.coordinates[0],
+    //           mapy: item.geometry.coordinates[1],
+    //         };
+    //       }).slice(0,3),
+    //   },
+    //   // new URL(`@/assets/img/pinpoint(1).png`, import.meta.url).href,
+    //   "images/sadian/汽车站.png",
+    // );
+    // addMultiImagePoints(
+    //   'jtlx-points',
+    //   {
+    //     data: analogData["医疗检测机构"].features
+    //       .filter((el) => el.geometry !== null)
+    //       .map((item) => {
+    //         return {
+    //           attributes: {
+    //             ...item.properties,
+    //           },
+    //           mapx: item.geometry.coordinates[0],
+    //           mapy: item.geometry.coordinates[1],
+    //         };
+    //       }).slice(0,3),
+    //   },
+    //   // new URL(`@/assets/img/pinpoint(1).png`, import.meta.url).href,
+    //   "images/sadian/实验室.png",
+    // );
+
     addMultiImagePoints(
       'jtlx-points',
       {
-        data: analogData["汽车站"].features
+        data: analogData["高速公路"].features
           .filter((el) => el.geometry !== null)
           .map((item) => {
             return {
               attributes: {
                 ...item.properties,
               },
-              mapx: item.geometry.coordinates[0],
-              mapy: item.geometry.coordinates[1],
+              paths: item.geometry.coordinates,
+
             };
           }),
+        type: "polylines",
+        symbol: {
+          type: 'simple-line',
+          color: [255, 132, 9, 0.5],
+          width: 5,
+        },
       },
-      // new URL(`@/assets/img/pinpoint(1).png`, import.meta.url).href,
-      "images/sadian/汽车站.png",
     );
+
     addMultiImagePoints(
       'jtlx-points',
       {
-        data: analogData["医疗检测机构"].features
+        data: analogData["快速路"].features
           .filter((el) => el.geometry !== null)
           .map((item) => {
             return {
               attributes: {
                 ...item.properties,
               },
-              mapx: item.geometry.coordinates[0],
-              mapy: item.geometry.coordinates[1],
+              paths: item.geometry.coordinates,
+
             };
           }),
+        type: "polylines",
+        symbol: {
+          type: 'simple-line',
+          color: [239, 132, 9, 0.5],
+          width: 5,
+        },
       },
-      // new URL(`@/assets/img/pinpoint(1).png`, import.meta.url).href,
-      "images/sadian/实验室.png",
     );
   }else {
     removeMapLayers("jtlx-points")

Разлика између датотеке није приказан због своје велике величине
+ 7576 - 9
src/utils/mapService/local-data.js