retrieveDefaultRouteTaskParameters fails

Discussion created by processor on May 19, 2012
Latest reply on Jun 6, 2012 by njarecha-esristaff

I'm using the RoutingSample project, it's working with the default map in the project and I can get the routes between the point.
the problem is when I read my own map, it fails on this code:
[self.routeTask retrieveDefaultRouteTaskParameters];

an alert view show this error at the very beginning:
Failed to retrieve default route parameters

the alert is in this function:
- (void)routeTask:(AGSRouteTask *)routeTask operation:(NSOperation *)op didFailToRetrieveDefaultRouteTaskParametersWithError:(NSError *)error {

// Create an alert to let the user know the retrieval failed
// Click Retry to attempt to retrieve the defaults again
UIAlertView *av = [[UIAlertView alloc] initWithTitle:@"Error"
             message:@"Failed to retrieve default route parameters"
            cancelButtonTitle:@"Ok" otherButtonTitles:@"Retry",nil];
[av show];
[av release];

so, how can I solve this problem ? if I want to set the parameters manually.. what the parameters should I write?