// 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