Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
micro-customization-system
/
e-shield-miniprogram
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit d7d8953c
authored
Apr 14, 2022
by
zhangxw
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
轨迹回放真机bug
1 parent
073faa0e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
27 deletions
pages/newTraReplay/traReplay.js
pages/newTraReplay/traReplay.js
View file @
d7d8953
...
@@ -170,6 +170,20 @@ Page({
...
@@ -170,6 +170,20 @@ Page({
polyline
:
polyline
,
polyline
:
polyline
,
includePoints
:
arr
includePoints
:
arr
})
})
this
.
myMap
.
getMapCtx
().
removeMarkers
({
markerIds
:
[
1
]
})
let
marker
=
[{
id
:
1
,
width
:
15
,
height
:
25
,
latitude
:
this
.
data
.
polyline
[
0
].
points
[
0
].
latitude
,
longitude
:
this
.
data
.
polyline
[
0
].
points
[
0
].
longitude
,
iconPath
:
'../../images/car.png'
}]
this
.
myMap
.
getMapCtx
().
addMarkers
({
markers
:
marker
})
}
else
{
}
else
{
wx
.
showModal
({
wx
.
showModal
({
content
:
'暂无数据'
,
content
:
'暂无数据'
,
...
@@ -194,36 +208,20 @@ Page({
...
@@ -194,36 +208,20 @@ Page({
},
},
beginTrack
()
{
beginTrack
()
{
if
(
this
.
data
.
polyline
.
length
)
{
if
(
this
.
data
.
polyline
.
length
)
{
this
.
myMap
.
getMapCtx
().
removeMarkers
({
this
.
setData
({
markerIds
:
[
1
]
isReplayIng
:
true
})
})
let
marker
=
[{
this
.
myMap
.
getMapCtx
().
moveAlong
({
id
:
1
,
markerId
:
1
,
width
:
15
,
path
:
this
.
data
.
polyline
[
0
].
points
,
height
:
25
,
duration
:
this
.
data
.
duration
,
latitude
:
this
.
data
.
polyline
[
0
].
points
[
0
].
latitude
,
success
:
(
res
)
=>
{
longitude
:
this
.
data
.
polyline
[
0
].
points
[
0
].
longitude
,
iconPath
:
'../../images/car.png'
}]
this
.
myMap
.
getMapCtx
().
addMarkers
({
markers
:
marker
,
success
:
()
=>
{
this
.
setData
({
this
.
setData
({
isReplayIng
:
true
isReplayIng
:
false
})
this
.
myMap
.
getMapCtx
().
moveAlong
({
markerId
:
1
,
path
:
this
.
data
.
polyline
[
0
].
points
,
duration
:
this
.
data
.
duration
,
success
:
(
res
)
=>
{
this
.
setData
({
isReplayIng
:
false
})
},
fail
:
()
=>
{
this
.
beginTrack
()
}
})
})
},
fail
:
()
=>
{
this
.
beginTrack
()
}
}
})
})
}
}
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment