Commit 5a6c1496 authored by lmj_521aiau@163.com's avatar lmj_521aiau@163.com

no message

parent 656666db
...@@ -98,21 +98,21 @@ ...@@ -98,21 +98,21 @@
[super viewDidAppear:animated]; [super viewDidAppear:animated];
self.refershMyself = YES; self.refershMyself = YES;
[[ZJLocationManager shared] initWithLocationUpdateInfo:^(ZJLocationModel * model, CLLocation * location, ZJMapType mapType) { // [[ZJLocationManager shared] initWithLocationUpdateInfo:^(ZJLocationModel * model, CLLocation * location, ZJMapType mapType) {
//
if(!model){ // if(!model){
return; // return;
} // }
//
CLLocationCoordinate2D coord = CLLocationCoordinate2DMake(model.latitude, model.longitude); // CLLocationCoordinate2D coord = CLLocationCoordinate2DMake(model.latitude, model.longitude);
//
if (self.refershMyself) { // if (self.refershMyself) {
self.GGMapView.camera = [GMSCameraPosition cameraWithTarget:coord zoom:self.zoom]; // self.GGMapView.camera = [GMSCameraPosition cameraWithTarget:coord zoom:self.zoom];
self.refershMyself = NO; // self.refershMyself = NO;
} // }
//
[self setPoint:coord target:1]; // [self setPoint:coord target:1];
}]; // }];
} }
-(void)shareAction { -(void)shareAction {
...@@ -359,12 +359,22 @@ ...@@ -359,12 +359,22 @@
double lat = [response[@"result"][@"data"][@"lat"] doubleValue]; double lat = [response[@"result"][@"data"][@"lat"] doubleValue];
double lon = [response[@"result"][@"data"][@"lon"] doubleValue]; double lon = [response[@"result"][@"data"][@"lon"] doubleValue];
MAPointAnnotation *pointAnnotation = [[MAPointAnnotation alloc] init]; MAPointAnnotation *pointAnnotation = [[MAPointAnnotation alloc] init];
pointAnnotation.coordinate = CLLocationCoordinate2DMake(lat, lon); pointAnnotation.coordinate = CLLocationCoordinate2DMake(lat, lon);
pointAnnotation.title = @"latestLocation"; pointAnnotation.title = @"latestLocation";
[_self.GDMapView addAnnotation:pointAnnotation]; [_self.GDMapView addAnnotation:pointAnnotation];
[_self.GDMapView setCenterCoordinate:pointAnnotation.coordinate animated:false]; [_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) { }else if ([[response objectForKey:@"status"] integerValue] == 105) {
[MBProgressHUD showError:[response objectForKey:@"msg"] toView:self.view]; [MBProgressHUD showError:[response objectForKey:@"msg"] toView:self.view];
} }
......
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