在国外使用我的应用程序时,谷歌GMSGeocoder
会自动以当地语言返回响应。如何将其设置为始终以英文返回响应?
我使用 GMS SDK 1.7,我的代码是这样的:
GMSGeocoder *geoCoder = [[GMSGeocoder alloc] init];
[geoCoder reverseGeocodeCoordinate:self.cellLocation.coordinate completionHandler:^(GMSReverseGeocodeResponse *respones, NSError *err) {
if([respones firstResult]) {
GMSAddress* address = [respones firstResult];
NSString* fullAddress = [NSString stringWithFormat:@"%@, %@",address.thoroughfare, address.locality];
self.theTextField.text = fullAddress;
} else {
self.theTextField.text = @"";
}
}];