Commit 2dcce617 authored by lmj_521aiau@163.com's avatar lmj_521aiau@163.com

no message

parent 1251bd05
...@@ -12,8 +12,6 @@ ...@@ -12,8 +12,6 @@
@interface ZJBaseMapViewController ()<MAMapViewDelegate, XMPopupListViewDelegate, MKMapViewDelegate> @interface ZJBaseMapViewController ()<MAMapViewDelegate, XMPopupListViewDelegate, MKMapViewDelegate>
@property (nonatomic, strong) MKMapView *mapView; @property (nonatomic, strong) MKMapView *mapView;
//@property (nonatomic, strong) MAMapView *mapView;
@property (nonatomic, strong) UIButton *gpsButton;
@property (nonatomic, strong) ZJMapViewPersonCardView *cardView; @property (nonatomic, strong) ZJMapViewPersonCardView *cardView;
...@@ -27,12 +25,10 @@ ...@@ -27,12 +25,10 @@
- (void)viewDidLoad { - (void)viewDidLoad {
[super viewDidLoad]; [super viewDidLoad];
// Do any additional setup after loading the view.
[self setupUI];
self.friendDataSource = [NSMutableArray array]; self.friendDataSource = [NSMutableArray array];
[self setupUI];
[self getFriendList]; [self getFriendList];
} }
...@@ -51,25 +47,15 @@ ...@@ -51,25 +47,15 @@
- (void)setupUI{ - (void)setupUI{
///初始化地图 ///初始化地图
// self.mapView = [[MKMapView alloc] initWithFrame:self.view.bounds]; self.mapView = [[MKMapView alloc] initWithFrame:self.view.bounds];
// self.mapView.mapType = 0; _mapView.showsUserLocation = YES;
//// _mapView.showsWorldMap = @YES; _mapView.userTrackingMode = MAUserTrackingModeFollow;
//// [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];
_mapView.delegate = self; _mapView.delegate = self;
// _mapView.zoomLevel = 14;
_mapView.showsScale = false; _mapView.showsScale = false;
_mapView.showsCompass = false; _mapView.showsCompass = false;
_mapView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
///把地图添加至view
[self.view addSubview: _mapView];
// 添加 card view // 添加 card view
self.cardView = [[[NSBundle mainBundle] loadNibNamed:@"ZJMapViewPersonCardView" owner:self options:nil] lastObject]; self.cardView = [[[NSBundle mainBundle] loadNibNamed:@"ZJMapViewPersonCardView" owner:self options:nil] lastObject];
...@@ -119,30 +105,6 @@ ...@@ -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 好友列表 #pragma mark 好友列表
- (void)getFriendList{ - (void)getFriendList{
...@@ -202,13 +164,6 @@ ...@@ -202,13 +164,6 @@
// [MBProgressHUD showError:[NSString stringWithFormat:@"获取好友列表失败\n%@", error.description] toView:self.view]; // [MBProgressHUD showError:[NSString stringWithFormat:@"获取好友列表失败\n%@", error.description] toView:self.view];
}]; }];
} }
#pragma mark - Action Handlers
- (void)returnAction
{
[self.navigationController popViewControllerAnimated:YES];
}
/** /**
选中cell后回调 选中cell后回调
@param indexPath 返回选中的indexPath @param indexPath 返回选中的indexPath
......
...@@ -81,11 +81,11 @@ ...@@ -81,11 +81,11 @@
[dateComponents setHour: -5]; [dateComponents setHour: -5];
self.stratDate = [gregorian dateByAddingComponents:dateComponents toDate: [NSDate date] options:0]; self.stratDate = [gregorian dateByAddingComponents:dateComponents toDate: [NSDate date] options:0];
if (self.autoTrack) { // if (self.autoTrack) {
[self queryLocationList:_model]; // [self queryLocationList:_model];
} else { // } else {
[self getLastLocation:_model]; // [self getLastLocation:_model];
} // }
} }
-(void)shareAction { -(void)shareAction {
...@@ -341,6 +341,7 @@ ...@@ -341,6 +341,7 @@
annotationView.enabled = NO; annotationView.enabled = NO;
annotationView.image = [UIImage imageNamed:@"userPosition"]; annotationView.image = [UIImage imageNamed:@"userPosition"];
// [mapView viewForAnnotation:mapView.userLocation]
return annotationView; return annotationView;
} }
return nil; return nil;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment