VMWalkingPathOverlay
Objective-C
@interface VMWalkingPathOverlay : NSObject
Swift
class VMWalkingPathOverlay : NSObject
Base abstract class that provides some functionality for enabling Wayfinding visualization
Since
1.1Warning
Do not create instances of this class directly.-
Display all waypoints and paths on the map for the specified floors
Since
1.2Declaration
Objective-C
- (void)showDebugWaypointsForIndoorFloors: (nullable NSArray<VMMSBaseFloor *> *)indoorFloors andOutdoorFloors: (nullable NSArray<VMMSBaseFloor *> *)outdoorFloors;Swift
func showDebugWaypoints(forIndoorFloors indoorFloors: [Any]?, andOutdoorFloors outdoorFloors: [Any]?)Parameters
indoorFloorsthe indoor floors to show waypoints and paths for
outdoorFloorsthe 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
Objective-C
- (void)didTapAtCoordinate:(CLLocationCoordinate2D)location;Swift
func didTap(at location: CLLocationCoordinate2D)Parameters
locationthe location of the tap
-
Called when user taps on a VMMSMapUnit in the map
Declaration
Objective-C
- (void)didTapUnit:(nonnull VMMSMapUnit *)unit atLocation:(CLLocationCoordinate2D)location;Swift
func didTapUnit(_ unit: Any!, atLocation location: CLLocationCoordinate2D)Parameters
unitthe VMMSMapUnit that was tapped
locationthe location of the tap
-
Set waypath and directions, and load path data
Since
1.2Declaration
Objective-C
- (void)setWaypath:(nullable VMMSWaypath *)waypath andDirections:(nullable NSArray<VMMSMapDirectionStep *> *)directions;Swift
func setWaypath(_ waypath: VMMSWaypath?, andDirections directions: [VMMSMapDirectionStep]?)Parameters
waypaththe new waypath
directionsthe 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.2Declaration
Objective-C
- (nonnull NSDictionary<NSString *, NSArray<VMWayfindingBaseFloor *> *> *) getActiveFloorsForFloor:(nullable VMMSBaseFloor *)targetFloor;Swift
func getActiveFloors(forFloor targetFloor: Any!) -> [String : [VMWayfindingBaseFloor]]Parameters
targetFloorthe target floor to evaluate
-
Shows waypath for the selected floors
Declaration
Objective-C
- (void)togglePathForFloor:(nullable VMWayfindingBaseFloor *)indoorFloor andOutdoors:(nullable VMWayfindingBaseFloor *)outdoorFloor;Swift
func togglePath(for indoorFloor: VMWayfindingBaseFloor?, andOutdoors outdoorFloor: VMWayfindingBaseFloor?)Parameters
indoorFloorthe current floor in a building to display the path for
outdoorFloorthe current outdoor in a building to display the path for
-
Show waypath for the selected list of floors
Since
1.2Declaration
Objective-C
- (void)togglePathForIndoorFloors: (nullable NSArray<VMWayfindingBaseFloor *> *)indoorFloors andOutdoorFloors: (nullable NSArray<VMWayfindingBaseFloor *> *)outdoorFloors;Swift
func togglePath(forIndoorFloors indoorFloors: [VMWayfindingBaseFloor]?, andOutdoorFloors outdoorFloors: [VMWayfindingBaseFloor]?)Parameters
indoorFloorsall indoor floors to show the path for
outdoorFloorsall outdoor floors to show the path for
-
Remove markers and paths from the map
Declaration
Objective-C
- (void)removeMarkersAndPaths;Swift
func removeMarkersAndPaths() -
Adjusts the camera zoom and position to the entire waypath on the current floor
Declaration
Objective-C
- (void)fixCameraToWaypath;Swift
func fixCameraToWaypath() -
Adjusts the camera zoom and position to show a given waypath segment
Since
1.2Declaration
Objective-C
- (void)fixCameraToSegment:(nonnull VMMSWaypathSegment *)segment withHeading:(float)bearing;Swift
func fixCamera(to segment: VMMSWaypathSegment, withHeading bearing: Float)Parameters
segmentThe target segment
bearingThe target map heading
-
Called when a waypath segment is selected
Declaration
Objective-C
- (void)onSegmentSelected:(nonnull VMMSWaypathSegment *)segment;Swift
func onSegmentSelected(_ segment: VMMSWaypathSegment)Parameters
segmentthe selected segment
-
Called when a waypath pegment is selected
Since
1.2Declaration
Objective-C
- (void)onSegmentSelected:(nonnull VMMSWaypathSegment *)segment adjustsCamera:(BOOL)adjusts;Swift
func onSegmentSelected(_ segment: VMMSWaypathSegment, adjustsCamera adjusts: Bool)Parameters
segmentthe selected segment
adjuststrue to auto adjust camera to fit segment
-
Clear everything
Declaration
Objective-C
- (void)reset;Swift
func reset()
-
Delegate for receiving callback events
Declaration
Objective-C
@property (nonatomic, weak) id<VMWalkingPathOverlayDelegate> _Nullable delegate; -
Indicates the waypoint where wayfinding will start
Declaration
Objective-C
@property (nonatomic, strong, nullable) VMMSWaypoint *startingWaypoint;Swift
var startingWaypoint: VMMSWaypoint? { get set } -
Indicates the waypoint where wayfinding will end
Declaration
Objective-C
@property (nonatomic, strong, nullable) VMMSWaypoint *endingWaypoint;Swift
var endingWaypoint: VMMSWaypoint? { get set } -
Show all waypoints on the current floor. Useful for debugging.
Declaration
Objective-C
@property (nonatomic) BOOL displayAllWaypoints;Swift
var displayAllWaypoints: Bool { get set } -
True when user is allowed to select start/destination waypoints. False otherwise.
Declaration
Objective-C
@property (nonatomic) BOOL isSelectingPoints;Swift
var isSelectingPoints: Bool { get set } -
True if you want to highlight a selected segment of the waypath. False otherwise.
Declaration
Objective-C
@property (nonatomic) BOOL highlightSelectedStep;Swift
var highlightSelectedStep: Bool { get set } -
A reference to the VMD that is backing the wayfinding
Declaration
Objective-C
@property (nonatomic, strong, nullable) VMMSMap *map; -
The current INDOOR floor
Declaration
Objective-C
@property (nonatomic, strong, nullable) VMMSBaseFloor *currentFloor; -
The current OUTDOOR floor
Declaration
Objective-C
@property (nonatomic, strong, nullable) VMMSBaseFloor *currentOutdoorFloor; -
The waypath being drawn
Declaration
Objective-C
@property (nonatomic, strong, nullable) VMMSWaypath *waypath;Swift
var waypath: VMMSWaypath? { get set } -
The turn-by-turn directions that correspond to the waypath
Declaration
Objective-C
@property (nonatomic, strong, nullable) NSArray<VMMSMapDirectionStep *> *directions;Swift
var directions: [VMMSMapDirectionStep]? { get set } -
Reference to internal MapLibre mapview
Declaration
Objective-C
@property (nonatomic, weak) MGLMapView *mapView -
Current landmarks
Declaration
Objective-C
@property (nonatomic, strong, nullable) NSMutableArray<VMLandmarkAnnotation *> *currentStepLandmarks;Swift
var currentStepLandmarks: NSMutableArray? { get set } -
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
Objective-C
@property (nonatomic, strong, nullable) NSMutableDictionary<NSString *, NSMutableArray<VMWaypointAnnotation *> *> *waypoints;Swift
var waypoints: NSMutableDictionary? { get set } -
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
Objective-C
@property (nonatomic, strong, nullable) NSMutableDictionary<NSString *, NSMutableArray<VMDebugPolyline *> *> *paths;Swift
var paths: NSMutableDictionary? { get set }
VMWalkingPathOverlay Class Reference