Commit bffc5c55 authored by 耿迪迪's avatar 耿迪迪

车辆信息 gengdidi

parent c493ac1b
......@@ -707,7 +707,7 @@ export class EditorMap {
marker.moveAlong(path , {
// 每一段的时长
duration: 800,//可根据实际采集时间间隔设置
duration: 8000,//可根据实际采集时间间隔设置
// JSAPI2.0 是否延道路自动设置角度在 moveAlong 里设置
autoRotation: true,
});
......
......@@ -312,11 +312,17 @@ export default {
this.backForm.vehicleId = row.vehicleId;
getLastLocation(param).then(res =>{
if(res){
res.data.iconType = 9;
this.map.clearbackTrack(param.vehicleId)
console.log(res.data.longitude && res.data.latitude,"fdsfdsa")
if(res.data.longitude && res.data.latitude){
res.data.iconType = 9;
this.map.clearbackTrack(param.vehicleId)
this.map.addDevice(res.data,MapCar);
this.map.map.panTo([res.data.longitude, res.data.latitude]);
}else{
this.$message({
message: '抱歉未获取到当前车辆位置信息!',
type: 'warning'
});
}
}
});
......@@ -382,14 +388,19 @@ export default {
},
searchLocations(){
getVehicleLocations(this.backForm).then(res =>{
console.log(res,"-------------ffffffffffffff")
let paths = [];
res.data.forEach(item => {
console.log(item,"-------------ffffffffffffff")
paths.push([item.longitude,item.latitude]);
})
this.map.backTrack(this.backForm.vehicleId,paths);
this.backOpen = false;
if(res.data.length == 1){
this.$message({
message: '抱歉当前车辆只能查看位置信息,无法形成轨迹!',
type: 'warning'
});
}else{
res.data.forEach(item => {
paths.push([item.longitude,item.latitude]);
})
this.map.backTrack(this.backForm.vehicleId,paths);
this.backOpen = false;
}
})
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment