Skip to content

Instantly share code, notes, and snippets.

@peterqliu
Last active June 14, 2016 18:00
Show Gist options
  • Save peterqliu/c5acf611953bad46104df6f82c7d927c to your computer and use it in GitHub Desktop.
Save peterqliu/c5acf611953bad46104df6f82c7d927c to your computer and use it in GitHub Desktop.

###1) Filter the restaurants by type https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter

###2) Get the subset of restaurants near the middle http://turfjs.org/examples/turf-centroid/

http://turfjs.org/examples/turf-buffer/

http://turfjs.org/examples/turf-inside/

###3) Find the x nearest restaurants to everyone https://www.mapbox.com/api-documentation/#distance

POST example using jQuery

###4) Render the restaurants as markers on the map https://www.mapbox.com/mapbox-gl-js/api/

###5) When user selects a restaurant, get driving directions from each person to the restaurant https://www.mapbox.com/api-documentation/#directions

###6) Draw the route lines onto the map https://www.mapbox.com/mapbox-gl-js/api/

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