1. 47
    Add a Delivery Radius to our Restaurant GeoJSON Data
    25s

Add a Delivery Radius to our Restaurant GeoJSON Data

Colby Fayock
InstructorColby Fayock
Share this video with your friends

Social Share Links

Send Tweet
Published 4 years ago
Updated 4 years ago

For this step, we're going back to our restaurant locations GeoJSON file. We want to be able to provide a value for how far away from each restaurant they're willing to deliver.

Click here for exercise instructions

Colby Fayock: [0:00] With over restaurant locations, we know which ones deliver, but we don't know how far they deliver. We're going to specify new property called delivery-radius, which we're going to define a value in meters, which specifies how far away that location delivers.

[0:10] Now, back inside of our code, we can also de-structure that value. To test this out, we're going to say, "If this restaurant delivers, we're going to console.log() out the name in that delivery-radius. Now, we can see that we defined the one delivery-radius but not the others. Once we fill out the radius for each location, we can see them all in our logs.

egghead
egghead
~ 38 minutes ago

Member comments are a way for members to communicate, interact, and ask questions about a lesson.

The instructor or someone from the community might respond to your question Here are a few basic guidelines to commenting on egghead.io

Be on-Topic

Comments are for discussing a lesson. If you're having a general issue with the website functionality, please contact us at support@egghead.io.

Avoid meta-discussion

  • This was great!
  • This was horrible!
  • I didn't like this because it didn't match my skill level.
  • +1 It will likely be deleted as spam.

Code Problems?

Should be accompanied by code! Codesandbox or Stackblitz provide a way to share code and discuss it in context

Details and Context

Vague question? Vague answer. Any details and context you can provide will lure more interesting answers!

Markdown supported.
Become a member to join the discussionEnroll Today