Routing - proxy.ashx

559
2
07-16-2011 10:05 AM
ShaningYu
Frequent Contributor
In ArcGIS Extension for the Google Maps API, Sample Code: Extract Profile of Google Route,
http://help.arcgis.com/en/webapi/javascript/gmaps/samples/geoprocessor/gp_profile.html shows the routing.  I loaded the source code and tried to run it locally, but unsuccessful.  Of the source code, Line 32:
esri.arcgis.gmaps.Config.proxyUrl = "/arcgisserver/apis/javascript/proxy/proxy.ashx";
I am not sure whether this is the problem to dis-function the routing if runs at my local CPU.
Please provide the hint if possible.  Thanks.
0 Kudos
2 Replies
ShaningYu
Frequent Contributor
I revised Line 32 as:
esri.arcgis.gmaps.Config.proxyUrl = "http://localhost:8080/proxy.jsp";
I still got the same result as my last post.  However, the InfoWondow does not display.
0 Kudos
nicogis
MVP Frequent Contributor
the geoprocessing run:

http://sampleserver2.arcgisonline.com/ArcGIS/rest/services/Elevation/ESRI_Elevation_World/GPServer/P...

you try another route that not need proxy (the shortest that to los angeles) : from Redlands, CA to Mentone, CA

in code fix: directions.load("from: " + fromAddr + " to: " + toAddr);
in function getDirections().

Perahps in sample path proxy isn't exist. Add a proxy page on your server with permission samples2.arcgisonline.com

see with fiddler request and response for fix the problems
0 Kudos