Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gassafety-progress
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
耿迪迪
gassafety-progress
Commits
5c7b1ebf
Commit
5c7b1ebf
authored
Mar 21, 2022
by
纪泽龙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加回放小车的点
parent
357e616d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
14 deletions
+19
-14
map.js
gassafetyprogress-web/src/utils/mapClass/map.js
+19
-14
No files found.
gassafetyprogress-web/src/utils/mapClass/map.js
View file @
5c7b1ebf
/*
* @Author: your name
* @Date: 2022-01-11 13:45:12
* @LastEditTime: 2022-03-21 1
7:43:29
* @LastEditTime: 2022-03-21 1
8:13:58
* @LastEditors: Please set LastEditors
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: /test/hello-world/src/utils/mapClass.js
...
...
@@ -682,7 +682,7 @@ export class EditorMap {
* @param {*} path 轨迹回访率丼
* @return {*}
*/
backTrack
(
vehicleId
,
path
,
times
)
{
backTrack
(
vehicleId
,
path
,
times
)
{
this
.
infowindowClose
();
AMap
.
plugin
(
"AMap.MoveAnimation"
,
()
=>
{
...
...
@@ -712,13 +712,15 @@ export class EditorMap {
});
// 每个path的点
marker
.
pointArr
=
[];
//
marker.pointArr = [];
// carTarget
//点击的时候,先传进来一个点
const
carPathData
=
{
...
marker
.
getExtData
()
};
const
carPathData
=
{
...
marker
.
getExtData
()
,
time
:
times
[
0
]
};
carPathData
.
iconType
=
14
;
this
.
addDevice
(
carPathData
,
null
);
this
.
addDevice
(
carPathData
,
null
);
// marker.pointArr.push(point);
marker
.
on
(
"moveend"
,
(
e
)
=>
{
// this.addDevice(carPathData,carBackComponent);
// 如果不是最后一个点,就创建一个新的worderpoint,如果是就不创建,并且把自身删除
...
...
@@ -726,14 +728,15 @@ export class EditorMap {
let
z
=
{
longitude
:
e
.
pos
[
0
],
latitude
:
e
.
pos
[
1
],
iconType
:
14
,
time
:
times
[
e
.
index
],
};
if
(
e
.
index
==
path
.
length
-
1
)
{
}
else
{
this
.
addDevice
(
z
,
null
);
// workPoint.infoWindow.open(map,e.passedPos
);
marker
.
pointArr
.
push
(
workPoint
);
}
//
if (e.index == path.length - 1) {
// point = this.addDevice(z, null);
// } else {
this
.
addDevice
(
z
,
null
);
// workPoint.infoWindow.open(map,e.passedPos
);
//
}
console
.
log
(
"定点"
,
e
);
});
...
...
@@ -755,9 +758,8 @@ export class EditorMap {
// 停止运动
item
.
stopMove
();
// 删除每个点
item
.
pointArr
?.
forEach
((
iten
)
=>
{
this
.
map
.
remove
(
iten
);
});
console
.
log
(
item
.
pointArr
);
if
(
item
.
polyline
)
{
this
.
map
.
remove
(
item
.
polyline
);
}
...
...
@@ -770,6 +772,9 @@ export class EditorMap {
// 最后把数组清空
this
.
allDevice
[
"9"
]
=
[];
// 把car的路径点也清空
this
.
allDevice
[
"14"
]?.
forEach
((
iten
)
=>
{
this
.
map
.
remove
(
iten
);
});
this
.
allDevice
[
"14"
]
=
[];
this
.
infowindowClose
();
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment