Renders a MPRoute on the map.

Export

Hierarchy

  • MPDirectionsRenderer

Constructors

Properties

eventEmitter?: NativeEventEmitter

Event handler.

onLegSelectedSub?: EmitterSubscription

Listener for leg selection events.

Methods

  • Selects the next leg if possible.

    Has no effect if the last leg is selected.

    Returns Promise<void>

    Async

  • Selects the previous leg if possible.

    Has no effect if the first leg is selected.

    Returns Promise<void>

    Async

  • Manually set the selected leg index on the route.

    This may reject if the resulting internal state is invalid (parsed index is out of bounds).

    Parameters

    • legIndex: number

    Returns Promise<void>

    Async

  • Enable/Disable the polyline animation when displaying a route element on the map.

    Parameters

    • animated: boolean
    • repeating: boolean
    • durationMs: number

    Returns Promise<void>

    Async

  • Set the duration of camera animations in ms.

    If the duration < 0 then camera animations are disabled, and the camera will move instantly.

    The value is 1000 ms by default

    Parameters

    • durationMs: number

    Returns Promise<void>

    Async

  • Set a listener, which will be invoked when a new leg has been selected.

    This is used for when the forward/back markers are selected on the map.

    Parameters

    Returns Promise<void>

    Async

  • Set a route to be rendered. This also resets the selected leg and step indices to 0.

    Parameters

    Returns Promise<void>

    Async

Generated using TypeDoc