Renders a MPRoute on the map.

Export

Constructors

  • Creates an instance of MPDirectionsRenderer.

    Parameters

    • nativeEventEmitter: typeof NativeEventEmitter

    Returns MPDirectionsRenderer

Properties

eventEmitter?: NativeEventEmitter

Event handler.

onLegSelectedSub?: EmitterSubscription

Listener for leg selection events.

Methods

  • Clears the route from the map.

    Returns Promise<void>

    Async

  • Gets the currently selected leg's floor index.

    Returns Promise<number>

    Async

  • 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 the fitmode of the camera, when displaying route elements on the map.

    Parameters

    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

  • Enable/Disable the route end/start label buttons from showing on the route. Default is true

    Parameters

    • show: boolean

    Returns Promise<void>

    Async

Generated using TypeDoc