Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface RouteOptions

Hierarchy

Index

Properties

Optional controls

controls: any

id

id: string

Optional infopanel

infopanel: { sections: {}; view: InfoPanelContentViewOptions }

Type declaration

Optional insets

insets: number[]

Amount of padding in pixels to use when fitting the bounds of a route to a map view.

You can provide one, two or four values. A single value will be applied to all sides. Two values correspond to the horizontal and vertical sides respectively. Four values correspond to the top, right, bottom and left sides of the map.

Default is [100, 100] or [0, 0] for compact (mobile) viewports.

Optional legend

Optional onAdd

onAdd: () => void

Type declaration

    • (): void
    • Returns void

Optional onData

onData: (result: any) => void

Type declaration

    • (result: any): void
    • Parameters

      • result: any

      Returns void

Optional onInit

onInit: () => void

Type declaration

    • (): void
    • Returns void

Optional onMarkerClick

onMarkerClick: (marker: any, data: any) => void

Type declaration

    • (marker: any, data: any): void
    • Parameters

      • marker: any
      • data: any

      Returns void

Optional onRemove

onRemove: () => void

Type declaration

    • (): void
    • Returns void

Optional onRouteData

onRouteData: (data: any) => any

Callback function called when remote route data has been loaded and configured but before rendering.

Type declaration

    • (data: any): any
    • Parameters

      • data: any

      Returns any

Optional onShapeClick

onShapeClick: (shape: any, data: any) => void

Type declaration

    • (shape: any, data: any): void
    • Parameters

      • shape: any
      • data: any

      Returns void

Optional onWeatherData

onWeatherData: (data: any) => any

Callback function called when weather data for the active route has loaded but before rendering.

Type declaration

    • (data: any): any
    • Parameters

      • data: any

      Returns any

Optional refresh

refresh: number

Route update interval, in seconds. Default value is 0, which disables auto-updating.

Minimum refresh rate is 60 seconds.

routes

routes: RouteConfig[]

Array of route configuration objects defining the routes for the module instance.

Optional service

service: { accessKey: string; type: "mapbox" | "google" }

Directions API service configuration.

Type declaration

  • accessKey: string

    Access key to use with the third-party directions API. Refer to the desired service's documentation for more information

  • type: "mapbox" | "google"

    Directions API service to use.

Optional showInfoOnSelect

showInfoOnSelect: boolean

A Boolean indicating whether the route's info panel should be presented when the route is selected and active. Default value is true for desktop and false for mobile devices.

Optional source

source: LayerOptions

Optional title

title: string

Route group title. This value is only used when multiple routes are defined for the module instance.

Optional type

type: "vector" | "geojson" | "text"

Optional url

url: string | ((id: string) => string)

URL string or a callback function that receives the currently active route and returns the URL path to use when requesting route data from a remote source.

Optional weatherTypes

weatherTypes: string[]

Array of weather type codes to include in the weather options for the layer group's control.

Default value is all codes, e.g. ['temps', 'winds', 'windgust', 'weather', 'alerts']. The active weather type determine which weather data is plotted along the route.

Generated using TypeDoc