POST
|
Hi, I'm using the Vehicle Routing Service and I have referred to the given documentation. I tried the example request and it worked fine. I made changes to it making some unnecessary options as null. Using that i got the job id and I requested for 'out_stops' using that which returned me the 'unable to complete operation' error. Basically I just need to create an optimal route between a set of points I already have, covering all the points. Here is my modified API request : https://logistics.arcgis.com/arcgis/rest/services/World/VehicleRoutingProblem/GPServer/SolveVehicleRoutingProblem/submitJob?token:<Token entered correctly> orders:{"features": [ {"geometry": {"x":-122.51,"y":37.7724},"attributes":{"DeliveryQuantities":null,"Name":"Store_1","ServiceTime":null,"TimeWindowStart1":null,"TimeWindowEnd1":null,"MaxViolationTime1":null} }, {"geometry": {"x":-122.4889,"y":37.7538},"attributes":{"DeliveryQuantities":null,"Name":"Store_2","ServiceTime":null,"TimeWindowStart1":null,"TimeWindowEnd1":null,"MaxViolationTime1":null} }, {"geometry": {"x":-122.4649,"y":37.7747},"attributes":{"DeliveryQuantities":null,"Name":"Store_3","ServiceTime":null,"TimeWindowStart1":null,"TimeWindowEnd1":null,"MaxViolationTime1":null} }, {"geometry": {"x":-122.4739,"y":37.7432},"attributes":{"DeliveryQuantities":null,"Name":"Store_4","ServiceTime":null,"TimeWindowStart1":null,"TimeWindowEnd1":null,"MaxViolationTime1":null} }, {"geometry": {"x":-122.4493,"y":37.7315},"attributes":{"DeliveryQuantities":null,"Name":"Store_5","ServiceTime":null,"TimeWindowStart1":null,"TimeWindowEnd1":null,"MaxViolationTime1":null} }, {"geometry": {"x":-122.4917,"y":37.6493},"attributes":{"DeliveryQuantities":null,"Name":"Store_6","ServiceTime":null,"TimeWindowStart1":null,"TimeWindowEnd1":null,"MaxViolationTime1":null} }, {"geometry": {"x":-122.4832,"y":37.7012},"attributes":{"DeliveryQuantities":null,"Name":"Store_7","ServiceTime":null,"TimeWindowStart1":null,"TimeWindowEnd1":null,"MaxViolationTime1":null} }, {"geometry": {"x":-122.5301,"y":37.8935},"attributes":{"DeliveryQuantities":null,"Name":"Store_8","ServiceTime":null,"TimeWindowStart1":null,"TimeWindowEnd1":null,"MaxViolationTime1":null} }, {"geometry": {"x":-122.2875,"y":37.8909},"attributes":{"DeliveryQuantities":null,"Name":"Store_9","ServiceTime":null,"TimeWindowStart1":null,"TimeWindowEnd1":null,"MaxViolationTime1":null} } ] } depots:{"features": [ {"geometry": {"x":-122.3943,"y":37.7967},"attributes":{"Name":"San Francisco","TimeWindowStart1":null,"TimeWindowEnd1":null} } ] } routes:{"features": [ {"attributes": {"Name":"Truck_1","StartDepotName":"San Francisco","EndDepotName":"San Francisco","StartDepotServiceTime":null,"EarliestStartTime":null,"LatestStartTime":null,"Capacities":null,"CostPerUnitTime":null,"CostPerUnitDistance":null,"MaxOrderCount":null,"MaxTotalTime":null,"MaxTotalTravelTime":null,"SpecialtyNames":null,"MaxTotalDistance":null}}] } time_units:Minutes distance_units:Miles uturn_policy:NO_UTURNS populate_directions:true directions_language:en default_date:1355212800000 f:json
... View more
11-24-2016
02:18 AM
|
0
|
0
|
1123
|
POST
|
Yes I'm using a proxy. Below is the proxy.config file <?xml version="1.0" encoding="utf-8" ?> <ProxyConfig allowedReferers="*" logFile="proxy_log.log" logLevel="INFO" mustMatch="true"> <serverUrls> <serverUrl url="http://services.arcgisonline.com" matchAll="true"/> <serverUrl url="http://route.arcgis.com" clientId=<id> clientSecret=<secret> username="username" password="password" matchAll="true"> </serverUrl> </serverUrls> </ProxyConfig> <!-- See https://github.com/Esri/resource-proxy for more information -->
... View more
11-24-2016
12:20 AM
|
0
|
1
|
348
|
POST
|
I'm using the sample code for Routing task to check before I buy. I have set up the proxy server and I'm giving some hardcoded latitude - longitude pairs in the code instead of clicking on the map. I am able to see the routes for 11 points successfully but if i input more than 11 points, I am facing the following errors: Response for preflight has invalid HTTP status code 403 Reason: CORS header 'Access-Control-Allow-Origin' missing And How do I use CORS in the code? #routing services #javascript app
... View more
11-23-2016
03:57 AM
|
0
|
3
|
1670
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:25 AM
|