feat:新增导览路线

wuyanfu
吴延福 2023-05-18 11:01:39 +08:00
parent 276d9e1c2c
commit a298037c7d
3 changed files with 9 additions and 4 deletions

View File

@ -25,12 +25,12 @@ export default class ViewLeftComponent extends Vue {
treeData = treeData; treeData = treeData;
viewList = [ viewList = [
{ {
id: Mock.mock("@id"), id: '1',
title: '北大门东区→南大门西区', title: '北大门东区→南大门西区',
from: '北大门东区', from: '北大门东区',
to: '南大门西区' to: '南大门西区'
}, { }, {
id: Mock.mock("@id"), id: '2',
title: '南大门东区→北大门西区', title: '南大门东区→北大门西区',
from: '南大门东区', from: '南大门东区',
to: '北大门西区' to: '北大门西区'

View File

@ -10,6 +10,7 @@ import boundsData from "@/mock/bounds"
import ParkFileService from '@/service/park.service'; import ParkFileService from '@/service/park.service';
import CloseService from '@/service/close.service'; import CloseService from '@/service/close.service';
import * as turf from "@turf/turf" import * as turf from "@turf/turf"
import path from '@/mock/path';
@Component({ @Component({
template, template,
@ -25,6 +26,7 @@ export default class BaseComponent extends Vue {
public layerData = layerData; public layerData = layerData;
public lock = true; public lock = true;
public tourPathData = path;
public timerList = {} as any; public timerList = {} as any;
public pakFilePath = "@path:DTS_Library_V5.4.pak"; public pakFilePath = "@path:DTS_Library_V5.4.pak";

View File

@ -57,6 +57,8 @@ export default class OverViewComponent extends BaseComponent {
this.player = store; this.player = store;
this.lock = false this.lock = false
this.resetMap(); this.resetMap();
this.player.api.cameraTour.delete("1");
this.player.api.cameraTour.delete("2");
this.player.api.customObject.clear(); this.player.api.customObject.clear();
this.player.api.polygon3d.clear(); this.player.api.polygon3d.clear();
this.player.api.marker.clear(); this.player.api.marker.clear();
@ -65,6 +67,7 @@ export default class OverViewComponent extends BaseComponent {
this.player.api.polyline.clear(); this.player.api.polyline.clear();
this.player.api.heatmap.clear(); this.player.api.heatmap.clear();
this.currentLayers = this.getCurrentLayers(); this.currentLayers = this.getCurrentLayers();
this.player.api.cameraTour.add(this.tourPathData)
} }
@ -118,7 +121,7 @@ export default class OverViewComponent extends BaseComponent {
this.hideAllPanel = !this.hideAllPanel; this.hideAllPanel = !this.hideAllPanel;
this.drawerChange(!this.hideAllPanel) this.drawerChange(!this.hideAllPanel)
if(!this.hideAllPanel){ if(!this.hideAllPanel){
this.player.api.cameraTour.stop();
this.player.api.settings.setInteractiveMode(0) this.player.api.settings.setInteractiveMode(0)
} }
} }
@ -207,7 +210,7 @@ export default class OverViewComponent extends BaseComponent {
//进入路线导览 //进入路线导览
playView(item){ playView(item){
this.toggleAllPanel() this.toggleAllPanel()
console.log('进入路线导览',item) this.player.api.cameraTour.play(item.id)
} }
deactivated(){ deactivated(){