Class Paths

While Navigation provides a complete start and end navigation illustration, it may be desired to draw just the path. This can be done using Paths.

Paths is accessed using MapView.Paths.

Paths can be drawn from one coordinate to another using Paths.add. If using just two coordinates, the path will be drawn straight between the two points. This may work for some scenarios, but in most cases an app will need to show the user their walking path, going through doors and avoiding walls and other objects. Such a path of coordinates can be created by calling the () method, passing in a start and end TNavigationTarget. Note that a Space requires an entrance to be used as a target.

The width of the path is set using the TAddPathOptions.nearRadius and TAddPathOptions.farRadius parameters. These values are in meters. nearRadius is the path width used at the lowest zoom level closest to the ground and farRadius is used at the highest zoom level. Additional path styles are outlined later in this guide in the Path Styles section.

Refer to the Drawing a Path in the Wayfinding Guide for more information and interactive examples.

Methods

  • Removes a specific path (Path) from the map.

    Parameters

    • path: Path

      The path to be removed.

    Returns void

    mapView.Paths.remove(path);
    
  • Removes all paths (Path) from the map.

    Returns Path[]

    mapView.Paths.removeAll();