I posted this question earlier, where we seem to hit a limit on the number of stops in a routing request. I was just trying out the following sample from the help
After 10 stops, it will not route anymore. When I copy the sample to my server and try it, the limit is 7. Which is odd. Anyway after some digging, it turns out that the regular routing engine is limited to 10 stops. I needed to get the world routing service which has a higher limit on the stops. I think 25. Anyway, its a paid service, which we purchased and followed the steps for getting a token. Then to test it out, in the same example above, replaced the line routeTask = new esri.tasks.RouteTask("http://tasks.arcgisonline.com/ArcGIS/rest/services/NetworkAnalysis/ESRI_Route_NA/NAServer/Route"); With the following line, which is supposedly what we are to use. routeTask = new esri.tasks.RouteTask("http://premiumtasks.arcgisonline.com/server/rest/services/NetworkAnalysis/ESRI_Route_NA/NAServer/Lon..............");
Only a part of the token is listed above. However, we seem to have the same 7 stop limit. When we don't include the token, we get an access denied error. If the token is incorrect, we get an invalid token error.
So, its appears that it is accepting the token when it is correct, just not performing anymore than 7 stops.
Anyone else here knows anything about the world routing engine and how to get it to work?
I did call tech support and they figured it out. Since it was a tricky I am posting the answer here. The problem was the samples use an ESRI proxy. You need a proxy because the request can get bigger than 2048 characters. The following is the line.
Which is why it stopped working at 7 stops. The request was just bigger than 2048 and was getting cut off. Since there were no error messages, it was tough to diagnose.
There is information on how to setup a proxy page on this link
However, if you install the php version, you will need cURL. The instructions that come up if cURL is not installed are for windows. They will not work for Linux and Apache. Use the instructions from the following link
I was going to try this avenue first. If not, I will try tech support next. There is no error message at all. That is the part that is puzzling. It just seems to ignore the request once we hit 7.
I did call tech support and they figured it out. Since it was a tricky I am posting the answer here. The problem was the samples use an ESRI proxy. You need a proxy because the request can get bigger than 2048 characters. The following is the line.
Which is why it stopped working at 7 stops. The request was just bigger than 2048 and was getting cut off. Since there were no error messages, it was tough to diagnose.
There is information on how to setup a proxy page on this link
However, if you install the php version, you will need cURL. The instructions that come up if cURL is not installed are for windows. They will not work for Linux and Apache. Use the instructions from the following link
Glad you got it figured out. I'm surprised you didn't see any errors. Usually, when requests are failing due to the URL being too large, you see this message in the browser's console:
esri.config.defaults.io.proxyUrl is not set.
Along with several errors. Take a look at this sample on jsfiddle that tries to buffer a large polygon: http://jsfiddle.net/xnWQC/