The stretch two sections of one route share, by point index.
A section of the route, of any type; a leg section only with its point indexes.
leg
Another section of the same route, likewise.
The shared stretch, or undefined when they share no segment, as two sections meeting at one point don't.
undefined
const { country = [], toll = [] } = route.properties.sections;const france = country.find((section) => section.countryCodeISO3 === 'FRA');const tollsInFrance = france ? toll.filter((section) => getSectionOverlap(section, france)) : []; Copy
const { country = [], toll = [] } = route.properties.sections;const france = country.find((section) => section.countryCodeISO3 === 'FRA');const tollsInFrance = france ? toll.filter((section) => getSectionOverlap(section, france)) : [];
The stretch two sections of one route share, by point index.