Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //clear route and calculate a new one
- [[SKRoutingService sharedInstance]clearCurrentRoutes];
- [[SKRoutingService sharedInstance] clearAllRoutesFromCache];
- [[SKRoutingService sharedInstance] clearRouteAlternatives];
- [[SKRoutingService sharedInstance] startRouteFromGPXFile:fname];
- [self.container addSubview:self.mapView];
- //on calculation finish
- - (void)routingService:(SKRoutingService *)routingService didFinishRouteCalculationWithInfo:(SKRouteInformation*)routeInformation{
- NSLog(@"Route is calculated.");
- [routingService zoomToRouteWithInsets:UIEdgeInsetsZero]; // zoom to current route
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement