Skip to content

Commit 03271fd

Browse files
committed
Fixed syntax error in batch geocoding example
1 parent 34b1af7 commit 03271fd

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,10 @@ options.focalLocation = locationManager.location
204204
options.allowedScopes = .pointOfInterest
205205
206206
let task = geocoder.batchGeocode(options) { (placemarksByQuery, attributionsByQuery, error) in
207+
guard let placemarksByQuery = placemarksByQuery else {
208+
return
209+
}
210+
207211
let nearestSkyline = placemarksByQuery[0][0].location
208212
let distanceToSkyline = nearestSkyline.distance(from: locationManager.location)
209213
let nearestGoldStar = placemarksByQuery[1][0].location

0 commit comments

Comments
 (0)