Service used to generate a route between two MPPoints.

Export

Constructors

  • Private

    Creates an instance of MPDirectionsService.

    Parameters

    • id: string

    Returns MPDirectionsService

Properties

id: string

Methods

  • Add an avoidWayType, these are based on OSM highways.

    Supported types are defined in MPHighway.

    Parameters

    • wayType: string

    Returns Promise<void>

    Async

  • Clears all added avoidWayTypes.

    Returns Promise<void>

    Async

  • Queries the routing network to generate a route from the origin to the destination.

    Parameters

    Returns Promise<MPRoute>

    Async

  • Sets whether routes should use departure time or arrival time when using the transit travel mode.

    Parameters

    • isDeparture: boolean

    Returns Promise<void>

    Async

  • sets the wanted arrival/departure time for routes generated with this [MPDirectionsService]

    this setting is used in conjunction with setIsDeparture and setTravelMode.

    Parameters

    • time: number

    Returns Promise<void>

    Async

  • defines the travel mode for routes, can be one of the following:

    • "walking"
    • "bicycling"
    • "driving"
    • "transit"

    Parameters

    • travelMode: string

    Returns Promise<void>

    Async

Generated using TypeDoc