|
@@ -207,7 +207,7 @@ export default {
|
|
this.map = new AMap.Map('containerwls', param);
|
|
this.map = new AMap.Map('containerwls', param);
|
|
this.marker = new AMap.Marker({
|
|
this.marker = new AMap.Marker({
|
|
map: this.map,
|
|
map: this.map,
|
|
- position: this.lineArr[0],
|
|
|
|
|
|
+ position: this.lineArr[this.lineArr.length-1],
|
|
icon: new AMap.Icon({
|
|
icon: new AMap.Icon({
|
|
image: '/nv.png',
|
|
image: '/nv.png',
|
|
size: new AMap.Size(46, 52), //图标所处区域大小
|
|
size: new AMap.Size(46, 52), //图标所处区域大小
|
|
@@ -215,8 +215,11 @@ export default {
|
|
}),
|
|
}),
|
|
offset: new AMap.Pixel(-23, -26),
|
|
offset: new AMap.Pixel(-23, -26),
|
|
});
|
|
});
|
|
|
|
+ window.wlsmap=this.map;
|
|
// 绘制轨迹
|
|
// 绘制轨迹
|
|
-
|
|
|
|
|
|
+ this.map.on('click', (e) => {
|
|
|
|
+ this.map.remove(this.wlMaker);
|
|
|
|
+ });
|
|
this.polyline = new AMap.Polyline({
|
|
this.polyline = new AMap.Polyline({
|
|
map: this.map,
|
|
map: this.map,
|
|
path: this.lineArr,
|
|
path: this.lineArr,
|
|
@@ -237,8 +240,8 @@ export default {
|
|
text: "Hello World",
|
|
text: "Hello World",
|
|
offset: new AMap.Pixel(-100, -100),
|
|
offset: new AMap.Pixel(-100, -100),
|
|
});
|
|
});
|
|
- this.wllabel.setPosition( this.lineArr[0]);
|
|
|
|
- this.wllabel.setContent("<div style='border:3px dashed #0925b6; width: 200px'>时间:"+ this.lineArrSj[0]+"<br/>"+this.lineArrAdree[0]+"</div>");
|
|
|
|
|
|
+ this.wllabel.setPosition( this.lineArr[this.lineArr.length-1]);
|
|
|
|
+ this.wllabel.setContent("<div style='border:3px dashed #0925b6; width: 200px'>时间:"+ this.lineArrSj[this.lineArr.length-1]+"<br/>"+this.lineArrAdree[this.lineArr.length-1]+"</div>");
|
|
|
|
|
|
this.wllabel.setMap(this.map);
|
|
this.wllabel.setMap(this.map);
|
|
this.marker.on('moving', (e) => {
|
|
this.marker.on('moving', (e) => {
|
|
@@ -327,11 +330,11 @@ export default {
|
|
}
|
|
}
|
|
if (this.bjdata[i][3]=="进入围栏")
|
|
if (this.bjdata[i][3]=="进入围栏")
|
|
{
|
|
{
|
|
- iconpath="/out.png"
|
|
|
|
|
|
+ iconpath="/in.png"
|
|
}
|
|
}
|
|
if (this.bjdata[i][3]=="离开围栏")
|
|
if (this.bjdata[i][3]=="离开围栏")
|
|
{
|
|
{
|
|
- iconpath="/in.png"
|
|
|
|
|
|
+ iconpath="/out.png"
|
|
}
|
|
}
|
|
|
|
|
|
let marker= new AMap.Marker({
|
|
let marker= new AMap.Marker({
|
|
@@ -351,6 +354,9 @@ export default {
|
|
nr: "类型:"+this.bjdata[i][3]+"<br/>时间:"+this.bjdata[i][1]+"<br/>地址:"+this.bjdata[i][6],
|
|
nr: "类型:"+this.bjdata[i][3]+"<br/>时间:"+this.bjdata[i][1]+"<br/>地址:"+this.bjdata[i][6],
|
|
})
|
|
})
|
|
marker.on('click', this.markerClick);
|
|
marker.on('click', this.markerClick);
|
|
|
|
+ marker.on("rightclick", function (e) {
|
|
|
|
+ window.wlsmap.remove(e.target);
|
|
|
|
+ })
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|