Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update store distance calculation #68

Open
wangannie opened this issue Apr 2, 2020 · 1 comment
Open

Update store distance calculation #68

wangannie opened this issue Apr 2, 2020 · 1 comment
Labels

Comments

@wangannie
Copy link
Member

Currently, store distance 'miles away' from the user's current location is calculated by the distance between long/lat coordinates. This is pretty inaccurate and not very helpful in real use, so we should look into a way to calculate the distance by walking or driving directions.

@annieyro
Copy link
Collaborator

annieyro commented Apr 2, 2020

TLDR I think this is a design decision, but here are some reasons why it makes sense to use Euclidean distance for display in the store list:

  • If you look at Yelp or Google Maps, when you search it’ll display the Euclidean distance. Then, when you click into an item, the detailed view /card converts the display distance to shortest time by {driving, walking} for Maps & shortest distance by whatever Yelp decided to use for Yelp. - To use driving/walking we would need to add a user setting for whether they prefer to see driving/walking (naively) or some other decision on when to display either. IMO it makes sense have to separate out that decision of using driving/walking time/distance into the actual usage of maps; currently we don’t have maps integrated in the cards (if we did, it might look how Yelp or a fitness tracker does).
  • Displaying the shortest-distance by walking or driving also assumes that customers will take the route calculated by {new method} when that might not be the case (maybe they always walk the same way, so they don't ever use Google maps), so displaying that value is problematic in that sense.
    Ultimately I think this is probably a design thing - deciding if we want to add a tooltip/note on how distance is calculated or change what happens when you click into a card or something idk haha

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants