liyg 2 anni fa
parent
commit
d6651cebe7

+ 7 - 4
src/views/statisticalReport/components/salesLogisticsStatistics/mapTest.vue

@@ -413,9 +413,12 @@ export default {
     addIndex() {
       let that = this
       let increment = that.listPath[0].runPath.length * 0.1
-      that.pathNavigator.start(
-        (that.point + increment) % that.listPath[0].runPath.length
-      )
+      let result = that.point + increment
+      if(result < that.listPath[0].runPath.length){
+        that.pathNavigator.start(that.point + increment)
+      }else{
+        that.pathNavigator.start(that.listPath[0].runPath.length-1)
+      }
     },
     ///che
     navgControl() {},
@@ -693,7 +696,7 @@ export default {
         })
         // 创建巡航器
         that.pathNavigator = that.pathSimplifierIns.createPathNavigator(0, {
-          loop: true, // 是否循环
+          loop: false, // 是否循环
           speed: that.speed, // 速度(km/h)
           pathNavigatorStyle: {
             width: 20,