Select to view content in your preferred language

Some question about Sample

696
2
04-11-2013 01:31 AM
jinxinhou
New Contributor
This url is the Arcgis js sample
http://help.arcgis.com/en/webapi/javascript/arcgis/jssamples/widget_directions_basic.html

Code�?
      function init() {
        esri.addProxyRule({
          urlPrefix: "route.arcgis.com", 
          proxyUrl: "/sproxy"
        });

look at the �??esri.addProxyRule�?�, I can't find any description about the method addProxyRule,and the property urlPrefix and proxyUrl�?
I don�??t know how to use them and their functions. please give me some advice. Thank you!
0 Kudos
2 Replies
DavideLimosani
Frequent Contributor
This url is the Arcgis js sample
http://help.arcgis.com/en/webapi/javascript/arcgis/jssamples/widget_directions_basic.html

Code�?
      function init() {
        esri.addProxyRule({
          urlPrefix: "route.arcgis.com", 
          proxyUrl: "/sproxy"
        });

look at the �??esri.addProxyRule�?�, I can't find any description about the method addProxyRule,and the property urlPrefix and proxyUrl�?
I don�??t know how to use them and their functions. please give me some advice. Thank you!



It's simple, all requests to route.arcgis.com will use the proxy defined in this object. esri.addProxyRule({ urlPrefix: "route.arcgis.com", proxyUrl: "/proxy.ashx" });

http://help.arcgis.com/en/webapi/javascript/arcgis/jsapi/namespace_esri.html#None
0 Kudos
jinxinhou
New Contributor
Thank you very much!
0 Kudos