Skip to end of metadata
Go to start of metadata

This documentation is no longer actively supported and may be out of date. Going forward, please visit and bookmark our new site (https://docs.phunware.com/) for up-to-date documentation.

Routing for iOS Mapping

 

Calculate Route

Simply feed the PWRoute class method two points of interest and whether or not accessibility should be considered when calculating the route. accessibility:YES will not use access points marked as "inaccessible" in the portal, e.g. stairs between floors.

Calculate then show route
__weak typeof(self) weakSelf = self;
[PWRoute initRouteFrom:<#(PWPointOfInterest *)#> to:<#(PWPointOfInterest *)#> accessibility:<#(BOOL)#> completion:^(PWRoute *route, NSError *error) {
    [weakSelf.mapView navigateWithRoute:route]; // will begin routing in PWMapView
}];

Current Route Updates

As a user traverses a route, PWMapKit will post notifications to tell the developer when the next routing instruction was reached.

Routing Updates
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(myInstructionUpdatedMethod:) name:PWRouteInstructionChangedNotificationKey object:nil];
  • No labels