Advertisement
Guest User

Untitled

a guest
Jul 25th, 2014
251
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. //clear route and calculate a new one
  2. [[SKRoutingService sharedInstance]clearCurrentRoutes];
  3. [[SKRoutingService sharedInstance] clearAllRoutesFromCache];
  4. [[SKRoutingService sharedInstance] clearRouteAlternatives];
  5. [[SKRoutingService sharedInstance] startRouteFromGPXFile:fname];
  6. [self.container addSubview:self.mapView];
  7.  
  8. //on calculation finish
  9. - (void)routingService:(SKRoutingService *)routingService didFinishRouteCalculationWithInfo:(SKRouteInformation*)routeInformation{
  10. NSLog(@"Route is calculated.");
  11. [routingService zoomToRouteWithInsets:UIEdgeInsetsZero]; // zoom to current route
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement