AnsweredAssumed Answered

Offline Routing

Question asked by akmuzammil on Feb 16, 2015
Latest reply on Feb 20, 2015 by NFurness-esristaff

Dear All,

 

I am not able to do offline routing with my network data. I am using latest ArcGIS SDK for iOS and developing in Objective C.

 

 

Initializing routeTask as shown below. "network.geodatabase" is the geodatabase included in the bundle. And "Network_ND" is under .tn folder which also included in the bundle.

 

        self.routeTask = [AGSRouteTask routeTaskWithDatabaseName:@"network" network:@"Network_ND" error:&error];

        // assign delegate to this view controller

        self.routeTask.delegate = self;

        self.routeTaskParams = [AGSRouteTaskParameters routeTaskParameters];

        // kick off asynchronous method to retrieve default parameters

        // for the route task

        [self.routeTask retrieveDefaultRouteTaskParameters];

 

 

I get below error after requesting retrieveDefaultRouteTaskParameters

 

Error Domain=com.esri.arcgis.runtime.error Code=10004 "Cannot retrieve route task parameters." UserInfo=0x7f8061529f40

 

 

And when I try to solve route after adding two points, I get below error.

 

 

Error Domain=com.esri.arcgis.runtime.error Code=10004 "Route task internal error." UserInfo=0x7f80616ed380 {NSLocalizedDescription=Route task internal error.}

 

 

But if I try by changing the code as shown below, I neither get any error nor any output. Neither the didSolveWithResult event is fired nor the didFailSolveWithError event.

 

        self.routeTask = [AGSRouteTask routeTaskWithDatabaseName:@"network.geodatabase" network:@"Network_ND" error:&error];

        // assign delegate to this view controller

        self.routeTask.delegate = self;

        self.routeTaskParams = [AGSRouteTaskParameters routeTaskParameters];

        // kick off asynchronous method to retrieve default parameters

        // for the route task

        [self.routeTask retrieveDefaultRouteTaskParameters];

 

 

 

Please throw some pointers on how to solve this issue.

 

Regards

Muzammil

Outcomes