Przeglądaj źródła

feat: 地图「勤务路线」调整路线和方向箭头密度

sequoia tungfang 2 tygodni temu
rodzic
commit
1ca88a244d
1 zmienionych plików z 6 dodań i 3 usunięć
  1. 6 3
      src/components/TongzhouTrafficMap.vue

+ 6 - 3
src/components/TongzhouTrafficMap.vue

@@ -318,7 +318,10 @@ export default {
           { start: [116.6445, 39.9075], end: [116.6846, 39.9075], color: "#13C373" }
         ],
         "勤务路线": [
-          { start: [116.7120, 39.9225], end: [116.7120, 39.8971], color: "#BC301D" }
+          // G1高速(京哈高速)通州段西半段:通州西入口 → 通州北关立交
+          { start: [116.6320, 39.9375], end: [116.7050, 39.9310], color: "#BC301D" },
+          // G1高速(京哈高速)通州段东半段:通州北关立交 → 通州东出口
+          { start: [116.7050, 39.9310], end: [116.7850, 39.9215], color: "#BC301D" }
         ]
       };
 
@@ -522,9 +525,9 @@ export default {
           pathDistances.push(totalPathDist);
         }
 
-        // 2. 设定标准间距:约每 0.0018 度 (约 200 米) 放置一个箭头
+        // 2. 设定标准间距:约每 0.0018 度 (约 200 米) 放置一个箭头;勤务路线密度减半
         if (configName !== '干线协调') {
-          const targetSpacing = 0.0018;
+          const targetSpacing = configName === '勤务路线' ? 0.0036 : 0.0018;
           let currentTargetDist = targetSpacing / 2; // 第一个箭头放在 1/2 间距处,让分布更美观
 
           while (currentTargetDist < totalPathDist) {