设备历史轨迹
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
<head>
|
||||
<script type="text/javascript" src="https://172.16.3.18/static_file/vconsole.min.js"></script>
|
||||
<script>
|
||||
// var vConsole = new VConsole();
|
||||
var vConsole = new VConsole();
|
||||
console.log('Hello world');
|
||||
</script>
|
||||
<meta charset="utf-8">
|
||||
|
||||
@@ -9,6 +9,9 @@
|
||||
<div class="timeSelectBoxItem">
|
||||
<van-button type="default" @click="showendDate=true">结束时间</van-button>
|
||||
</div>
|
||||
<div class="timeSelectBoxItem">
|
||||
<van-button type="default" @click="playPath=!playPath">{{playPath?'停止播放':'播放轨迹'}}</van-button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="addAlarmPoint" v-if="page=='addAlarmPoint'">
|
||||
<div class="addAlarmPointNext" @click="addAlarmPointNextAction">下一步</div>
|
||||
@@ -188,6 +191,7 @@ export default {
|
||||
moveUserId: "",
|
||||
moveIndex: 0,
|
||||
pointMoveTimer:null,
|
||||
playPath:false
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
@@ -609,7 +613,14 @@ export default {
|
||||
|
||||
},
|
||||
startAnimation() {
|
||||
|
||||
|
||||
this.pointMoveTimer=setInterval(()=>{
|
||||
|
||||
if(!this.playPath){
|
||||
return false;
|
||||
}
|
||||
|
||||
this.moveIndex = this.moveIndex + 30
|
||||
|
||||
if(this.moveIndex>=this.routeOriginList.length){
|
||||
@@ -1110,12 +1121,9 @@ export default {
|
||||
},
|
||||
moveFromStartToEnd() {
|
||||
|
||||
if (Object.keys(this.vectorLayer).length == 0) {
|
||||
// 创建图层
|
||||
this.vectorLayer = new VectorLayer({
|
||||
source: new VectorSource(),
|
||||
});
|
||||
// 图层添加到地图上
|
||||
if (Object.keys(this.vectorLayer).length > 0) {
|
||||
|
||||
// 将旧图层删掉
|
||||
this.map.removeLayer(this.vectorLayer);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user