Skip to content

Conversation

@TomCasaletto
Copy link

Added address and distance to restaurant output.

@chadxz
Copy link

chadxz commented Jun 8, 2015

  1. Instead of writing your own implementation of the distance formula without tests (which is error prone), use an existing library from npm. https://github.com/manuelbieh/geolib looks to be a good one
  2. Instead of embedding the data about the location in the name, add properties to the JSON that is returned and let the frontend format the data into the name. That way the data can be used for other things too (like showing the locations on a map) without having to extract the data from the name

@dannagle
Copy link

dannagle commented Jun 8, 2015

Google's map library also has a distance formula:
google.maps.geometry.spherical.computeDistanceBetween(results[i].geometry.location, latlong)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants