The route whose properties.progress will be used for interpolation.
The section whose start and end point indices define the segment.
A RouteSegmentProgress object, or undefined when either index cannot
be interpolated (see calculateProgressAtRoutePoint for the full list of conditions).
const section = route.properties.sections.countries[0];
const result = getRouteProgressForSection(route, section);
if (result) {
console.log(`Section starts ${result.start.distanceInMeters} m from route origin`);
console.log(`Section ends ${result.end.distanceInMeters} m from route origin`);
console.log(`Section length ${result.delta.distanceInMeters} m`);
console.log(`Section takes ${result.delta.travelTimeInSeconds} s`);
}
Calculates progress measurements for a route section.
Convenience wrapper around getRouteProgressBetween that accepts a SectionProps directly, using its
startPointIndexandendPointIndexas the segment bounds.