Type Alias TGetDirectionsOptions

TGetDirectionsOptions: {
    accessible?: boolean;
    excludedConnections?: Connection[];
    smoothing?: boolean | { enabled?: boolean; radius: number };
    zones?: TDirectionZone[];
}

Options for controlling the behavior of the Directions.

Type declaration

  • Optionalaccessible?: boolean

    If true directions will only take accessible routes

    false
    
  • Optional ExperimentalexcludedConnections?: Connection[]

    Enterprise only. Connections that should not be used for directions.

    If a connection is excluded, it will not be used in the directions even if it is the shortest (or only) path. If there is no path that does not include the these connections, the directions will be undefined.

  • Optionalsmoothing?: boolean | { enabled?: boolean; radius: number }

    Enable or disable line-of-sight directions smoothing. With this option enabled, the directions will be simplified to provide a more visually appealing path and shorter instructions.

    Can be a boolean to enable or disable smoothing, or an object with a radius property to specify the line of sight radius in metres.

    true
    
    // Enable smoothing with a radius of 3 metres
    mapView.getDirections(firstSpace, secondSpace, {
    smoothing: {
    radius: 3,
    }
    })
  • Optionalzones?: TDirectionZone[]

    Defines the special zones for navigation operations.

    mapView.getDirections(firstSpace, secondSpace, {
    zones: [
    {
    geometry: polygon as Feature<Polygon>,
    // The additional cost for navigation through the zone, from 0 to Infinity.
    // The final cost is calculated as the sum of basic cost that comes from the {@MapData}
    // and the additional zone cost.
    // A additional cost of 0 will make the zone free to navigate through
    // A additional cost of Infinity will make the zone impossible to navigate through
    cost: Infinity,
    floor: mapView.currentFloor,
    },
    ],
    });
MMNEPVFCICPMFPCPTTAAATR