Condition
in the top action block.
-73.979412
, latitude of 40.752834
) and the World Trade Center (longitude of -74.012215
, latitude of 40.711483
). Visit https://docs.mapbox.com/playground/directions to get the coordinates for your location and just replace them in the URL.
driving
in the request URL as the routing profile. You can change it to walking
or cycling
if that’s how you commute.
{{steps.get-commute.outputs.Body.routes.[0].duration}}
. In this example the value for this is 1125.284
which is 1125 seconds.
{{steps.get-commute.outputs.Body.routes.[0].duration}}
and will call this value Duration
going forward. This step is optional but makes it easier to expand the the app if we want to.
{{steps.duration.value}}
in the calculation which is the variable value for duration we created in the previous step.
{{steps.covert-to-minutes-hour.outputs.Result.[0].hours}}
= 0
{{steps.covert-to-minutes-hour.outputs.Result.[0].minutes}}
{{steps.covert-to-minutes-hour.outputs.Result.[0].hours}}
&{{steps.covert-to-minutes-hour.outputs.Result.[0].minutes}}