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

no message

parent 1251bd05
......@@ -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
......
......@@ -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;
......
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