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
2dcce617
Commit
2dcce617
authored
Jul 28, 2020
by
lmj_521aiau@163.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
1251bd05
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
58 deletions
+14
-58
ZJBaseMapViewController.m
ZhiJi/Classes/Map/Controller/ZJBaseMapViewController.m
+8
-53
ZJFriendTrackMapViewController.m
...i/Classes/Map/Controller/ZJFriendTrackMapViewController.m
+6
-5
No files found.
ZhiJi/Classes/Map/Controller/ZJBaseMapViewController.m
View file @
2dcce617
...
...
@@ -12,8 +12,6 @@
@interface
ZJBaseMapViewController
()
<
MAMapViewDelegate
,
XMPopupListViewDelegate
,
MKMapViewDelegate
>
@property
(
nonatomic
,
strong
)
MKMapView
*
mapView
;
//@property (nonatomic, strong) MAMapView *mapView;
@property
(
nonatomic
,
strong
)
UIButton
*
gpsButton
;
@property
(
nonatomic
,
strong
)
ZJMapViewPersonCardView
*
cardView
;
...
...
@@ -27,12 +25,10 @@
-
(
void
)
viewDidLoad
{
[
super
viewDidLoad
];
// Do any additional setup after loading the view.
[
self
setupUI
];
self
.
friendDataSource
=
[
NSMutableArray
array
];
[
self
setupUI
];
[
self
getFriendList
];
}
...
...
@@ -51,25 +47,15 @@
-
(
void
)
setupUI
{
///初始化地图
// self.mapView = [[MKMapView alloc] initWithFrame:self.view.bounds];
// self.mapView.mapType = 0;
//// _mapView.showsWorldMap = @YES;
//// [self.mapView performSelector:@selector(setShowsWorldMap:) withObject:@(YES)];
// if ([ZJUserInfoManager CNLanguage]) {
// // self.mapView.mapLanguage = @0;
// // [self.mapView performSelector:NSSelectorFromString(@"setMapLanguage:") withObject:@(0)];
// }else{
// // self.mapView.mapLanguage = @1;
// // [self.mapView performSelector:NSSelectorFromString(@"setMapLanguage:") withObject:@(1)];
// }
// _mapView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
// ///把地图添加至view
// [self.view addSubview: _mapView];
self
.
mapView
=
[[
MKMapView
alloc
]
initWithFrame
:
self
.
view
.
bounds
];
_mapView
.
showsUserLocation
=
YES
;
_mapView
.
userTrackingMode
=
MAUserTrackingModeFollow
;
_mapView
.
delegate
=
self
;
// _mapView.zoomLevel = 14;
_mapView
.
showsScale
=
false
;
_mapView
.
showsCompass
=
false
;
_mapView
.
autoresizingMask
=
UIViewAutoresizingFlexibleWidth
|
UIViewAutoresizingFlexibleHeight
;
///把地图添加至view
[
self
.
view
addSubview
:
_mapView
];
// 添加 card view
self
.
cardView
=
[[[
NSBundle
mainBundle
]
loadNibNamed
:
@"ZJMapViewPersonCardView"
owner
:
self
options
:
nil
]
lastObject
];
...
...
@@ -119,30 +105,6 @@
};
}
//- (void)mapView:(UIView *)mapView regionDidChangeAnimated:(BOOL)animated {
//// if(mapView.isHidden) {
//// return;
//// }
////
//// if(self.isSwitching) {
//// self.isSwitching = NO;
//// return;
//// }
//
//// [self.mapView performSelector:NSSelectorFromString(@"setMapLanguage:") withObject:@(1)];
//// [self.mapView performSelector:NSSelectorFromString(@"setMapLanguage:") withObject:@(0)];
//
// if([mapView isKindOfClass:[MAMapView class]]) {
// if(!AMapDataAvailableForCoordinate(self.mapView.centerCoordinate)) {
//
// }
// } else {
// if(AMapDataAvailableForCoordinate(self.mapView.centerCoordinate)) {
//
// }
// }
//}
#pragma mark 好友列表
-
(
void
)
getFriendList
{
...
...
@@ -202,13 +164,6 @@
// [MBProgressHUD showError:[NSString stringWithFormat:@"获取好友列表失败\n%@", error.description] toView:self.view];
}];
}
#pragma mark - Action Handlers
-
(
void
)
returnAction
{
[
self
.
navigationController
popViewControllerAnimated
:
YES
];
}
/**
选中cell后回调
@param indexPath 返回选中的indexPath
...
...
ZhiJi/Classes/Map/Controller/ZJFriendTrackMapViewController.m
View file @
2dcce617
...
...
@@ -81,11 +81,11 @@
[
dateComponents
setHour
:
-
5
];
self
.
stratDate
=
[
gregorian
dateByAddingComponents
:
dateComponents
toDate
:
[
NSDate
date
]
options
:
0
];
if
(
self
.
autoTrack
)
{
[
self
queryLocationList
:
_model
];
}
else
{
[
self
getLastLocation
:
_model
];
}
//
if (self.autoTrack) {
//
[self queryLocationList:_model];
//
} else {
//
[self getLastLocation:_model];
//
}
}
-
(
void
)
shareAction
{
...
...
@@ -341,6 +341,7 @@
annotationView
.
enabled
=
NO
;
annotationView
.
image
=
[
UIImage
imageNamed
:
@"userPosition"
];
// [mapView viewForAnnotation:mapView.userLocation]
return
annotationView
;
}
return
nil
;
...
...
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