Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
// User's current location
const current = {lat, lng}
const closest = data.results.map((station) => {
const coord = station.geometry.location
return { coord, dist: geolib.getDistance(current, coord) }
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.