Instantly share code, notes, and snippets.

Embed
What would you like to do?
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