codeforhuntsville / Frontier

A civic app for finding whats near me
http://codeforhuntsville.com/
MIT License
9 stars 7 forks source link

Added restaurant details for issue #47 #48

Open TomCasaletto opened 9 years ago

TomCasaletto commented 9 years ago

Added address and distance to restaurant output.

chadxz commented 9 years ago
  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 commented 9 years ago

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