我可以在Google表格中使用什么公式来实现这一目标?
CLLocationCoordinate2D coordinate = _currentLocation;
NSString *api = [NSString stringWithFormat:kMapAPIForLocation, coordinate.latitude, coordinate.longitude, apiKey];
NSURL *url = [NSURL URLWithString:api];
__block PMIiSMSPlace *placeMark = nil;
GMSMarker *marker=[[GMSMarker alloc]init];
self.marker3 = marker;
NSURLSession *session = [NSURLSession sharedSession];
[[session dataTaskWithURL:url
completionHandler:^(NSData *data,
NSURLResponse *response,
NSError *error) {
DLog(@"Response Code = %ld", (long)[(NSHTTPURLResponse *)response statusCode]);
if(error){
[m_objGlobal.g_objExceptionHandler sendErrorCode:m_objGlobalData.g_strSelectedJourneyPlanNumber withVisitNumber:m_objGlobalData. g_strSelectedVisitNumber withExceptionReason:[ NSString stringWithFormat:@"Unable to fetch address from google map error desc = %@", error.description] withErrorCode:error.code];
DLog(@"Map Error = %@", error.userInfo);
}
if(data){
placeMark = [self parseData:data];
self.currentPlace = placeMark;
self.marker3.position=_currentLocation;
self.marker3.icon = [GMSMarker markerImageWithColor:[UIColor greenColor]];
self.marker3.title=placeMark.formatted_address;
self.marker3.snippet=[NSString stringWithFormat:@"%.6f,%.6f",self.marker3.position.latitude,self.marker3.position.longitude ];
self.marker3.map = self.mapView_;
[self.marker3 setDraggable:YES];
placeMark = nil;
}else{
placeMark = [[PMIiSMSPlace alloc] init];
self.currentPlace = placeMark;
self.marker3.position=self->_currentLocation;
self.marker3.icon = [GMSMarker markerImageWithColor:[UIColor greenColor]];
self.marker3.title=placeMark.formatted_address;
self.marker3.snippet=[NSString stringWithFormat:@"%.6f,%.6f",self.marker3.position.latitude,self.marker3.position.longitude ];
self.marker3.map = self.mapView_;
[self.marker3 setDraggable:YES];
placeMark = nil;
}
}] resume];
}
到
December 26, 2018
December 24, 2018