From 2dc2a21795dbfb7283beab8463c2344d189b0e69 Mon Sep 17 00:00:00 2001 From: tangwenkang <2720983602@qq.com> Date: Wed, 6 Dec 2023 10:24:29 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E6=AF=954?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/vehicle/record.vue | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/src/views/vehicle/record.vue b/src/views/vehicle/record.vue index 64d5c9e..8fbde30 100644 --- a/src/views/vehicle/record.vue +++ b/src/views/vehicle/record.vue @@ -105,23 +105,23 @@ export default { }); this.map.add(this.marker) - // // 绘制轨迹 - // this.polyline = new AMap.Polyline({ - // path: this.lineArr, - // showDir: true, - // strokeColor: "#28F", //线颜色 - // // strokeOpacity: 1, //线透明度 - // strokeWeight: 6, //线宽 - // // strokeStyle: "solid" //线样式 - // }); - // this.map.add(this.polyline) - // - // // 走过的路径 - // this.passedPolyline = new AMap.Polyline({ - // strokeColor: "#AF5", //线颜色 - // strokeWeight: 6, //线宽 - // }); - // this.map.add(this.passedPolyline) + // 绘制轨迹 + this.polyline = new AMap.Polyline({ + path: this.lineArr, + showDir: true, + strokeColor: "#28F", //线颜色 + // strokeOpacity: 1, //线透明度 + strokeWeight: 6, //线宽 + // strokeStyle: "solid" //线样式 + }); + this.map.add(this.polyline) + + // 走过的路径 + this.passedPolyline = new AMap.Polyline({ + strokeColor: "#AF5", //线颜色 + strokeWeight: 6, //线宽 + }); + this.map.add(this.passedPolyline) // 监听marker移动 this.marker.on('moving', (e) => {