Created
October 22, 2018 07:02
-
-
Save fitomad/868c1565b74dd678eb72dbe19999ef69 to your computer and use it in GitHub Desktop.
This file contains 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
function addressFromCoordinate(coordinate) | |
{ | |
let geocoder = new mapkit.Geocoder(); | |
geocoder.reverseLookup(coordinate, function(error, data) { | |
let latitude = data.results[0].coordinate.latitude; | |
let longitude = data.results[0].coordinate.longitude; | |
let formattedAddress = data.results[0].formattedAddress; | |
console.log("Coordinates (%f, %f) == Address (%s)", latitude, longitude, formattedAddress); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment