Class Paths

API to add and remove paths from maps. See also Journey.

Hierarchy

  • Paths

Accessors

Methods

Accessors

  • get paths(): Path[]
  • An array of all Path instances that are currently drawn.

    Returns Path[]

Methods

  • Takes an array of MappedinNode instances and draws an Path with path segments on each map corresponding to the nodes on that map.

    const departure = mapView.venue.locations.find((l) => l.name === "Apple")!;
    const destination = mapView.venue.locations.find((l) => l.name === "Cleo")!;
    const directions = departure.directionsTo(destination);

    // Draw the above directions as a path on the map
    mapView.Paths.add(directions.path);

    Parameters

    Returns Path

  • Remove a Path from all maps it exists on.

    const path = mapView.Paths.add(nodes);

    ...

    // The path is no longer needed
    mapView.Paths.remove(path);

    Parameters

    • path: Path

      The Path instance to be removed.

    Returns void

  • Remove all Path instances from all maps.

    Returns void