VMWalkingPathOverlay

@interface VMWalkingPathOverlay : NSObject

Base abstract class that provides some functionality for enabling Wayfinding visualization

Since

1.1

Warning

Do not create instances of this class directly.
  • Display all waypoints and paths on the map for the specified floors

    Since

    1.2

    Declaration

    Swift

    - (void)showDebugWaypointsForIndoorFloors:
                (NSArray<VMMSMapBuildingFloor *> *)indoorFloors
                             andOutdoorFloors:
                                 (NSArray<VMMSMapOutdoorBuildingFloor *> *)
                                     outdoorFloors;

    Parameters

    indoorFloors

    the indoor floors to show waypoints and paths for

    outdoorFloors

    the outdoor floors to show waypoints and paths for

  • Called when user taps on a point in the map. Checks to see if the user was selecting a starting point, ending point, or nothing.

    Declaration

    Swift

    - (void)didTapAtCoordinate:(CLLocationCoordinate2D)location;

    Parameters

    location

    the location of the tap

  • Called when user taps on a VMMSMapUnit in the map

    Declaration

    Swift

    - (void)didTapUnit:(VMMSMapUnit *)unit
            atLocation:(CLLocationCoordinate2D)location;

    Parameters

    unit

    the VMMSMapUnit that was tapped

    location

    the location of the tap

  • Load path data for the current waypath

    Declaration

    Swift

    - (void)loadPathData;
  • Set waypath and directions, and load path data

    Since

    1.2

    Declaration

    Swift

    - (void)setWaypath:(VMMSWaypath *)waypath
         andDirections:(NSArray<VMMSMapDirectionStep *> *)directions;

    Parameters

    waypath

    the new waypath

    directions

    the new directions

  • Determine which other associated floors need to be visible based on the target floor. For example, when the ground floor of a building is shown, the ground floor outdoors can also be shown

    Since

    1.2

    Declaration

    Swift

    - (NSDictionary<NSString *, NSArray<VMMSBaseFloor *> *> *)
        getActiveFloorsForFloor:(VMMSBaseFloor *)targetFloor;

    Parameters

    targetFloor

    the target floor to evaluate

  • Shows waypath for the selected floors

    Declaration

    Swift

    - (void)togglePathForFloor:(VMMSMapBuildingFloor *)indoorFloor
                   andOutdoors:(VMMSMapOutdoorBuildingFloor *)outdoorFloor;

    Parameters

    indoorFloor

    the current floor in a building to display the path for

    outdoorFloor

    the current outdoor in a building to display the path for

  • Show waypath for the selected list of floors

    Since

    1.2

    Declaration

    Swift

    - (void)togglePathForIndoorFloors:
                (NSArray<VMMSMapBuildingFloor *> *)indoorFloors
                     andOutdoorFloors:
                         (NSArray<VMMSMapOutdoorBuildingFloor *> *)outdoorFloors;

    Parameters

    indoorFloors

    all indoor floors to show the path for

    outdoorFloors

    all outdoor floors to show the path for

  • Remove markers and paths from the map

    Declaration

    Swift

    - (void)removeMarkersAndPaths;
  • Adjusts the camera zoom and position to the entire waypath on the current floor

    Declaration

    Swift

    - (void)fixCameraToWaypath;
  • Adjusts the camera zoom and position to show a given waypath segment

    Since

    1.2

    Declaration

    Swift

    - (void)fixCameraToSegment:(VMMSWaypathSegment *)segment
                   withHeading:(float)bearing;

    Parameters

    segment

    The target segment

    bearing

    The target map heading

  • Called when a waypath segment is selected

    Declaration

    Swift

    - (void)onSegmentSelected:(VMMSWaypathSegment *)segment;

    Parameters

    segment

    the selected segment

  • Called when a waypath pegment is selected

    Since

    1.2

    Declaration

    Swift

    - (void)onSegmentSelected:(VMMSWaypathSegment *)segment
                adjustsCamera:(BOOL)adjusts;

    Parameters

    segment

    the selected segment

    adjusts

    true to auto adjust camera to fit segment

  • Clear everything

    Declaration

    Swift

    - (void)reset;
  • Delegate for receiving callback events

    Declaration

    Swift

    @property (readwrite, nonatomic) id<VMWalkingPathOverlayDelegate> delegate;
  • Indicates the waypoint where wayfinding will start

    Declaration

    Swift

    @property (readwrite, strong, nonatomic) VMMSWaypoint *startingWaypoint;
  • Indicates the waypoint where wayfinding will end

    Declaration

    Swift

    @property (readwrite, strong, nonatomic) VMMSWaypoint *endingWaypoint;
  • Show all waypoints on the current floor. Useful for debugging.

    Declaration

    Swift

    @property (assign, readwrite, nonatomic) BOOL displayAllWaypoints;
  • True when user is allowed to select start/destination waypoints. False otherwise.

    Declaration

    Swift

    @property (assign, readwrite, nonatomic) BOOL isSelectingPoints;
  • True if you want to highlight a selected segment of the waypath. False otherwise.

    Declaration

    Swift

    @property (assign, readwrite, nonatomic) BOOL highlightSelectedStep;
  • map

    A reference to the VMD that is backing the wayfinding

    Declaration

    Swift

    @property (readwrite, strong, nonatomic) VMMSMap *map;
  • The current INDOOR floor

    Declaration

    Swift

    @property (readwrite, strong, nonatomic) VMMSMapBuildingFloor *currentFloor;
  • The current OUTDOOR floor

    Declaration

    Swift

    @property (readwrite, strong, nonatomic)
        VMMSMapOutdoorBuildingFloor *currentOutdoorFloor;
  • The waypath being drawn

    Declaration

    Swift

    @property (readwrite, strong, nonatomic) VMMSWaypath *waypath;
  • The turn-by-turn directions that correspond to the waypath

    Declaration

    Swift

    @property (readwrite, strong, nonatomic)
        NSArray<VMMSMapDirectionStep *> *directions;
  • Reference to internal mapbox mapview

    Declaration

    Swift

    @property (nonatomic, weak)  MGLMapView *mapView
  • Current landmarks

    Declaration

    Swift

    @property (readwrite, strong, nonatomic)
        NSMutableArray<VMLandmarkAnnotation *> *currentStepLandmarks;
  • Waypoints for debugging. This should be all of the waypoints on the current floor, regardless of whether they are on the current waypath or not.

    Declaration

    Swift

    @property (readwrite, strong, nonatomic)
        NSMutableDictionary<NSString *, NSMutableArray<VMWaypointAnnotation *> *>
            *waypoints;
  • Paths for debugging. This should be all of the paths on the current floor, regardless of whether they are on the current waypath of not.

    Declaration

    Swift

    @property (readwrite, strong, nonatomic)
        NSMutableDictionary<NSString *, NSMutableArray<VMDebugPolyline *> *> *paths;