Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
Z
ZhiJi-Overseas
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lmj
ZhiJi-Overseas
Commits
767b56f0
Commit
767b56f0
authored
Jul 23, 2020
by
lmj_521aiau@163.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
0831a24c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
18 deletions
+12
-18
ZJFriendTrackMapViewController.m
...i/Classes/Map/Controller/ZJFriendTrackMapViewController.m
+12
-18
No files found.
ZhiJi/Classes/Map/Controller/ZJFriendTrackMapViewController.m
View file @
767b56f0
...
...
@@ -58,9 +58,6 @@
@property
(
nonatomic
,
strong
)
GMSMarker
*
endMarker
;
@property
(
nonatomic
,
strong
)
GMSMarker
*
actionMarker
;
@property
(
nonatomic
,
assign
)
NSInteger
count
;
@property
(
nonatomic
,
retain
)
NSTimer
*
timer
;
@end
@implementation
ZJFriendTrackMapViewController
...
...
@@ -255,7 +252,7 @@
CLLocationCoordinate2D
position
=
point
;
GMSMarker
*
marker
=
[
GMSMarker
markerWithPosition
:
position
];
marker
.
title
=
@"Hello World"
;
marker
.
map
=
_
m
apView
;
marker
.
map
=
_
GGM
apView
;
}
}
...
...
@@ -296,45 +293,42 @@
}
}
_initialPolyline
.
path
=
_initiallinepath
;
_initialPolyline
.
map
=
_
m
apView
;
_initialPolyline
.
map
=
_
GGM
apView
;
_startMarker
.
map
=
nil
;
_startMarker
=
[
GMSMarker
markerWithPosition
:
startCoordinate
];
_startMarker
.
appearAnimation
=
kGMSMarkerAnimationPop
;
_startMarker
.
icon
=
[
UIImage
imageNamed
:
@"map_track_start_icon"
];
_startMarker
.
title
=
@"start"
;
_startMarker
.
map
=
_
m
apView
;
_startMarker
.
map
=
_
GGM
apView
;
_endMarker
.
map
=
nil
;
_endMarker
=
[
GMSMarker
markerWithPosition
:
endCoordinate
];
_endMarker
.
appearAnimation
=
kGMSMarkerAnimationPop
;
_endMarker
.
icon
=
[
UIImage
imageNamed
:
@"map_track_end_icon"
];
_endMarker
.
title
=
@"end"
;
_endMarker
.
map
=
_
m
apView
;
_endMarker
.
map
=
_
GGM
apView
;
GMSCameraPosition
*
camera
=
[
GMSCameraPosition
cameraWithLatitude
:(
startCoordinate
.
latitude
+
endCoordinate
.
latitude
)
/
2
longitude
:(
startCoordinate
.
longitude
+
endCoordinate
.
longitude
)
/
2
zoom
:
_zoom
];
_mapView
.
camera
=
camera
;
for
(
int
idx
=
0
;
idx
<
self
.
initiallinepath
.
count
;
idx
++
){
_GGMapView
.
camera
=
camera
;
}
self
.
actionMarker
.
map
=
nil
;
self
.
actionMarker
=
[
GMSMarker
markerWithPosition
:
startCoordinate
];
self
.
actionMarker
.
icon
=
[
UIImage
imageNamed
:
@"map_track_move_icon"
];
self
.
actionMarker
.
title
=
@"move"
;
self
.
actionMarker
.
map
=
self
.
m
apView
;
self
.
actionMarker
.
map
=
self
.
GGM
apView
;
_actionlinepath
=
[
GMSMutablePath
path
];
_count
=
0
;
_
_block
NSInteger
count
=
0
;
dispatch_source_t
timer
=
dispatch_source_create
(
DISPATCH_SOURCE_TYPE_TIMER
,
0
,
0
,
dispatch_get_global_queue
(
DISPATCH_QUEUE_PRIORITY_DEFAULT
,
0
));
dispatch_source_set_timer
(
timer
,
DISPATCH_TIME_NOW
,
0
.
16
*
NSEC_PER_SEC
,
0
*
NSEC_PER_SEC
);
dispatch_source_set_event_handler
(
timer
,
^
{
if
(
self
.
count
<
self
.
initiallinepath
.
count
)
{
if
(
count
<
self
.
initiallinepath
.
count
)
{
CLLocationCoordinate2D
coordinate
=
[
self
.
initiallinepath
coordinateAtIndex
:
self
.
count
];
CLLocationCoordinate2D
coordinate
=
[
self
.
initiallinepath
coordinateAtIndex
:
count
];
[
self
.
actionlinepath
addCoordinate
:
coordinate
];
self
.
actionPolyline
=
[
GMSPolyline
polylineWithPath
:
self
.
actionlinepath
];
...
...
@@ -348,10 +342,10 @@
[
CATransaction
setAnimationDuration
:
0
.
15
];
self
.
actionMarker
.
position
=
coordinate
;
// self.actionMarker.rotation = location.course
[
self
.
m
apView
animateToCameraPosition
:
camera
];
self
.
actionPolyline
.
map
=
self
.
m
apView
;
[
self
.
GGM
apView
animateToCameraPosition
:
camera
];
self
.
actionPolyline
.
map
=
self
.
GGM
apView
;
[
CATransaction
commit
];
self
.
count
++
;
count
++
;
}
else
{
dispatch_source_cancel
(
timer
);
}
...
...
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