RouteTask: Problem with Stops

4760
3
Jump to solution
09-26-2012 08:10 AM
PhilippFauser
New Contributor
Hi there,

I need some help on performing the AGSRouteTask in an iPhone app.

In my code I put 2 stops in the RouteTaskParameters and try to calculate the route, but I get the following error:
Error: Error Domain=NSCocoaErrorDomain Code=400 "Unable to complete  operation."  UserInfo=0x913940 { NSLocalizedFailureReason=  Input field [STRASSE] was not mapped to a field in the network analysis class "Stops".    Input field [TYP_ID] was not mapped to a field in the network analysis class "Stops".    "and so on..."  Location "Parkhaus Innstadt " in "Stops" is unlocated.    Location "Parkhaus Innstadt " in "Stops" is unlocated.    Invalid locations detected.,   NSURL= "long URL in here",  NSLocalizedDescription=Unable to complete  operation.}


The stops are initialized like this:
AGSStopGraphic* stop = [[AGSStopGraphic alloc] initWithGeometry:parkingDeck._shape.geometry symbol:parkingDeck._shape.symbol attributes:parkingDeck._shape.attributes infoTemplateDelegate:parkingDeck._shape.infoTemplateDelegate];


"_shape" contains a reference to an AGSGraphic object from a db-query (db from an arcgis server).

Is there something wrong with initializing the StopGraphic-objects? Or whats wrong with that?

A little hint would be very helpfull! If you need more information, please tell me!

Thanks in advance!

Greetings
Philipp
0 Kudos
1 Solution

Accepted Solutions
NimeshJarecha
Esri Regular Contributor
Yes, you need a custom NAServer which supports your data.

Hope this helps!

Regards,
Nimesh

View solution in original post

0 Kudos
3 Replies
NimeshJarecha
Esri Regular Contributor
The simplest thing to verify whether your stops are correct. Open solve route REST end point in browser and provide the same stops you are passing in the code. What result you get?

Regards,
Nimesh
0 Kudos
PhilippFauser
New Contributor
Ah, thank you Nimesh, I think this helped a lot!
So maybe, I first need some basic understanding of the whole route-task-thing!:)

I'm trying to get the geometry-stop-data out of this database http://www.geoportal.passau.de/ArcGIS/rest/services/APPDATEN/MapServer/1 and calculate a route with this NAServer: http://tasks.arcgisonline.com/ArcGIS/rest/services/NetworkAnalysis/ESRI_Route_EU/NAServer/Route.

It seems not to work this way! I tried the geometry-data with the "solve route" option on the NAServer as mentioned by Nimesh.

The geometry-data I extract out of the database(http://www.geoportal.passau.de/ArcGIS/rest/services/APPDATEN/MapServer/1) is related to this "custom" MapServer http://www.geoportal.passau.de/ArcGIS/rest/services/STADTPLAN/MapServer.

Does this mean I also need a "custom" NAServer to calculate a route with the geometry-data?

Sorry, I am relatively new to ArcGIS, but it would be great to get some help here!:)
0 Kudos
NimeshJarecha
Esri Regular Contributor
Yes, you need a custom NAServer which supports your data.

Hope this helps!

Regards,
Nimesh
0 Kudos