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.