以下代码仅返回前10个地址的坐标。但我需要超过100个地址以便存储到数据库中。地理编码器是否有限制?我该怎么办?
for(int i=0;i<count;i++)
{
CLGeocoder *geoCode = [[CLGeocoder alloc] init];
[geoCode geocodeAddressString:strcity completionHandler:^(NSArray *placemarks, NSError *error)
{
if (!error)
{
CLPlacemark *place = [placemarks objectAtIndex:0];
CLLocation *location = place.location;
CLLocationCoordinate2D coord = location.coordinate;
NSString *tempLati=[[NSString alloc]initWithFormat:@"%g",coord.latitude];
NSString *tempLongi=[[NSString alloc]initWithFormat:@"%g",coord.longitude];
[objCountries.countryLatitude addObject:tempLati];
[objCountries.countryLongitude addObject:tempLongi];
[geoCode cancelGeocode];
}
}];
}