Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'd like to send a parameter with the Route Task and be able to get that same parameter in the RouteResult object. The goal is to be able to recognize the routes I receive from the server when I perform many solve operations on the same RouteTask.

share|improve this question
up vote 3 down vote accepted

There is no need to send something along to the server (and expecting it back). The AsyncResponder supports a third argument "token" which can be used for this. There is no need to create special classes or wrap it when the Adobe/Apache Flex SDK support it already :)

token:Object (default = null) — Additional information to associate with this request.

Some of the ArcGIS API for Flex samples take advantage of this, for example in the "Routing Directions" example which use it to keep track of the "from" and "to" geocodes:

share|improve this answer

One solution would be to create your own custom geoprocess that wraps the RouteTask. You pass all the parameters for the RouteTask and your extra parameters and then return the result of the RouteTask along with your own parameters. I used this method to take geocoding parameters and my own custom parameters, then called the geoprocess function and returned geocoding results along with my own tracking parameters that I had passed in.

share|improve this answer
Yes but geoprocessing services are very slow in comparison with NA services. I need my request to be processed by the server in ~1 sec. – yo_haha Feb 18 '13 at 9:21

I think I'm going to create a new class that will contain its own RouteTask, the callback function for the RouteTask and my own parameters. Then each time I need to use a routeTask, I will use my new object created. What do you think?

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.