# How to get walk time?

**URL:** <https://community.mappedin.com/t/how-to-get-walk-time/54>\
**Category:** Mappedin JS\
**Created:** [June 6, 2024, 7:39pm UTC](https://community.mappedin.com/t/how-to-get-walk-time/54 "2024-06-06T19:39:32Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![BerryFun](https://yyz2.discourse-cdn.com/flex004/user_avatar/community.mappedin.com/berryfun/32/73_2.png) [@BerryFun](https://community.mappedin.com/u/BerryFun)\
**Post date:** [June 6, 2024, 7:39pm UTC](https://community.mappedin.com/t/how-to-get-walk-time/54/1 "2024-06-06T19:39:32Z")

</div>

Is there a method to find the walk time from Point A to Point B in the SDK? I believe the answer is yes since Mappedin web UI displays times, but I couldn’t find anything about it on the dev portal. This is for SDK v5.

---

<div class="post-metadata">

**Author:** ![msohm](https://yyz2.discourse-cdn.com/flex004/user_avatar/community.mappedin.com/msohm/32/6_2.png) [@msohm](https://community.mappedin.com/u/msohm)\
**Post date:** [June 7, 2024, 1:19pm UTC](https://community.mappedin.com/t/how-to-get-walk-time/54/2 "2024-06-07T13:19:27Z")

</div>

The Mappedin SDK doesn’t have a method that provides walk time. However, the directionsTo and distanceTo methods include the walking distance of the journey. You can take that distance and use the [preferred walking speed](https://en.wikipedia.org/wiki/Preferred_walking_speed) to estimate the walk time using the code below.

```auto
//Find the location with the name "ThinkKitchen" to use as a start point.

const startLocation = venue.locations.find(

(location) => location.name === "Start Location Name"

);

//Find the location with the name "Microsoft" to use as an end point.

const endLocation = venue.locations.find(

(location) => location.name === "End Location Name"

);

//Get directions between the start and end locations.

const directions = startLocation.directionsTo(endLocation);

// Taken from https://en.wikipedia.org/wiki/Preferred_walking_speed

// 1.42 meters per second.

const walkingSpeed = 1.42;

const walkTime = Math.round(directions.distance / walkingSpeed / 60);

```

---

<div class="post-metadata">

**Author:** ![BerryFun](https://yyz2.discourse-cdn.com/flex004/user_avatar/community.mappedin.com/berryfun/32/73_2.png) [@BerryFun](https://community.mappedin.com/u/BerryFun)\
**Post date:** [June 11, 2024, 12:20pm UTC](https://community.mappedin.com/t/how-to-get-walk-time/54/3 "2024-06-11T12:20:37Z")

</div>

This makes sense, thank you for the code sample.
