Last active
May 1, 2016 09:33
-
-
Save malcommac/b067ad25975153ffd02dd65a5ca1b2a0 to your computer and use it in GitHub Desktop.
Reverse Geocoding with SwiftLocation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| let address = "1 Infinite Loop, Cupertino (USA)" | |
| LocationManager.shared.reverseAddress(address: address, onSuccess: { foundPlacemark in | |
| // foundPlacemark is a CLPlacemark object | |
| }) { error in | |
| // failed to reverse geocoding due to an error | |
| } | |
| let coordinates = CLLocationCoordinate2DMake(41.890198, 12.492204) | |
| // Use Google service to obtain placemark | |
| LocationManager.shared.reverseLocation(service: .Google, coordinates: coordinates, onSuccess: { foundPlacemark in | |
| // foundPlacemark is a CLPlacemark object | |
| }) { error in | |
| // failed to reverse geocoding | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment