Skip to main content

RouteLeg

One stretch of a route, between two consecutive stops.

This is an interface exported by @mapcairn/core, checked against version 0.2.0.

Signature​

import type { RouteLeg } from "@mapcairn/core";

interface RouteLeg

Properties​

geometry​

readonly geometry: RouteLineGeometry;

The line the leg follows.

properties​

readonly properties: {
readonly distance: number;
readonly duration: number;
};

The leg's length and travel time.

type​

readonly type: "Feature";

Always Feature, as GeoJSON writes it.

See also​

Source: packages/core/src/ports/routing.ts:21