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.
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 to estimate the walk time using the code below.
//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);
This makes sense, thank you for the code sample.