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
5a6c1496
Commit
5a6c1496
authored
Jul 23, 2020
by
lmj_521aiau@163.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
656666db
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
15 deletions
+25
-15
ZJFriendTrackMapViewController.m
...i/Classes/Map/Controller/ZJFriendTrackMapViewController.m
+25
-15
No files found.
ZhiJi/Classes/Map/Controller/ZJFriendTrackMapViewController.m
View file @
5a6c1496
...
...
@@ -98,21 +98,21 @@
[
super
viewDidAppear
:
animated
];
self
.
refershMyself
=
YES
;
[[
ZJLocationManager
shared
]
initWithLocationUpdateInfo
:
^
(
ZJLocationModel
*
model
,
CLLocation
*
location
,
ZJMapType
mapType
)
{
if
(
!
model
){
return
;
}
CLLocationCoordinate2D
coord
=
CLLocationCoordinate2DMake
(
model
.
latitude
,
model
.
longitude
);
if
(
self
.
refershMyself
)
{
self
.
GGMapView
.
camera
=
[
GMSCameraPosition
cameraWithTarget
:
coord
zoom
:
self
.
zoom
];
self
.
refershMyself
=
NO
;
}
[
self
setPoint
:
coord
target
:
1
];
}];
//
[[ZJLocationManager shared] initWithLocationUpdateInfo:^(ZJLocationModel * model, CLLocation * location, ZJMapType mapType) {
//
//
if(!model){
//
return;
//
}
//
//
CLLocationCoordinate2D coord = CLLocationCoordinate2DMake(model.latitude, model.longitude);
//
//
if (self.refershMyself) {
//
self.GGMapView.camera = [GMSCameraPosition cameraWithTarget:coord zoom:self.zoom];
//
self.refershMyself = NO;
//
}
//
//
[self setPoint:coord target:1];
//
}];
}
-
(
void
)
shareAction
{
...
...
@@ -359,12 +359,22 @@
double
lat
=
[
response
[
@"result"
][
@"data"
][
@"lat"
]
doubleValue
];
double
lon
=
[
response
[
@"result"
][
@"data"
][
@"lon"
]
doubleValue
];
MAPointAnnotation
*
pointAnnotation
=
[[
MAPointAnnotation
alloc
]
init
];
pointAnnotation
.
coordinate
=
CLLocationCoordinate2DMake
(
lat
,
lon
);
pointAnnotation
.
title
=
@"latestLocation"
;
[
_self
.
GDMapView
addAnnotation
:
pointAnnotation
];
[
_self
.
GDMapView
setCenterCoordinate
:
pointAnnotation
.
coordinate
animated
:
false
];
CLLocationCoordinate2D
coord
=
CLLocationCoordinate2DMake
(
lat
,
lon
);
if
(
self
.
refershMyself
)
{
self
.
GGMapView
.
camera
=
[
GMSCameraPosition
cameraWithTarget
:
coord
zoom
:
self
.
zoom
];
self
.
refershMyself
=
NO
;
}
[
self
setPoint
:
coord
target
:
1
];
}
else
if
([[
response
objectForKey
:
@"status"
]
integerValue
]
==
105
)
{
[
MBProgressHUD
showError
:[
response
objectForKey
:
@"msg"
]
toView
:
self
.
view
];
}
...
...
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