@watergis/maplibre-gl-terradraw
    Preparing search index...

    Valhalla routing API class

    Index

    Constructors

    Methods

    • Calculate the route using Valhalla routing API.

      Parameters

      • tripData: LngLat[]

        array of LngLat coordinates for the trip

      • costingModel: "auto" | "pedestrian" | "bicycle"

        means of transport for Valhalla routing API.

      • distanceUnit: "miles" | "kilometers"

        distance unit for Valhalla routing API.

      Returns Promise<
          | undefined
          | {
              feature: GeoJSONFeature;
              pointFeatures: { features: GeoJSONFeature[]; type: string };
          },
      >

      returns a feature with LineString geometry and point features for the trip data

      Error if the trip data is invalid or if the Valhalla API returns