Skip to content

Commit 8020e95

Browse files
committed
Removed batch geocoding example in Objective-C
Generics don’t bridge to Objective-C.
1 parent d503e05 commit 8020e95

File tree

1 file changed

+0
-18
lines changed

1 file changed

+0
-18
lines changed

README.md

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -218,24 +218,6 @@ let task = geocoder.batchGeocode(options) { (placemarksByQuery, attributionsByQu
218218
}
219219
```
220220

221-
```objc
222-
// main.m
223-
MBForwardBatchGeocodeOptions *options = [[MBForwardBatchGeocodeOptions alloc] initWithQueries:@[@"skyline chili", @"gold star chili"]];
224-
options.focalLocation = locationManager.location;
225-
options.allowedScopes = MBPlacemarkScopePointOfInterest;
226-
227-
NSURLSessionDataTask *task = [geocoder batchGeocode:options completionHandler:^(NSArray<NSArray<MBGeocodedPlacemark *> *> * _Nullable placemarksByQuery, NSArray<NSString *> * _Nullable attributionsByQuery, NSError * _Nullable error) {
228-
MBPlacemark *nearestSkyline = placemarksByQuery[0][0].location;
229-
CLLocationDistance distanceToSkyline = [nearestSkyline distanceFromLocation:locationManager.location];
230-
MBPlacemark *nearestGoldStar = placemarksByQuery[1][0].location;
231-
CLLocationDistance distanceToGoldStar = [nearestGoldStar distanceFromLocation:locationManager.location];
232-
233-
NSLengthFormatter *formatter = [[NSLengthFormatter alloc] init];
234-
NSString *distance = [formatter stringFromMeters:MIN(distanceToSkyline, distanceToGoldStar)];
235-
NSLog("Found a chili parlor %@ away.", distance);
236-
}];
237-
```
238-
239221
Batch geocoding is available to Mapbox enterprise accounts. See the [Mapbox Geocoding](https://www.mapbox.com/geocoding/) website for more information.
240222

241223
## Tests

0 commit comments

Comments
 (0)