<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to add the &amp;quot;overrides&amp;quot; property to RouteParameters? in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-add-the-quot-overrides-quot-property-to/m-p/402908#M37115</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="https://community.esri.com/migrated-users/43956"&gt;Rene Rubalcava&lt;/A&gt;‌ no opinion, or did I link&amp;nbsp;the wrong profile of yours?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 13 Jun 2017 12:32:35 GMT</pubDate>
    <dc:creator>NiklasKöhn</dc:creator>
    <dc:date>2017-06-13T12:32:35Z</dc:date>
    <item>
      <title>How to add the "overrides" property to RouteParameters?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-add-the-quot-overrides-quot-property-to/m-p/402904#M37111</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all, hi &lt;A href="https://community.esri.com/migrated-users/6443" target="_blank"&gt;Rene Rubalcava&lt;/A&gt;‌, hi &lt;A href="https://community.esri.com/people/mcrowder-esristaff" target="_blank"&gt;mcrowder-esristaff&lt;/A&gt;‌,&lt;/P&gt;&lt;P&gt;I'm using the Directions widget in JS API 3.x, and I'm setting some &lt;A href="https://developers.arcgis.com/javascript/3/jsapi/routeparameters-amd.html" rel="nofollow noopener noreferrer" target="_blank"&gt;RouteParameters&lt;/A&gt;&amp;nbsp;via&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
this.directions.on("directions-start", lang.hitch(this, function(evt) {
&amp;nbsp; this.directions.routeParams.impedanceAttribute = &amp;lt;...&amp;gt;;
&amp;nbsp; this.directions.routeParams.accumulateAttributes = &amp;lt;...&amp;gt;;&amp;nbsp; 
&amp;nbsp; this.directions.routeParams.directionsTimeAttribute = &amp;lt;...&amp;gt;;&amp;nbsp; 
}));&lt;/PRE&gt;&lt;P&gt;Those are working, I can see them&amp;nbsp;being send&amp;nbsp;in the GET request and they affect the results as expected.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;Now here's the thing&lt;/SPAN&gt;: There is a &lt;STRONG&gt;new parameter&lt;/STRONG&gt; in the &lt;A href="http://vsdev2035:6080/arcgis/sdk/rest/index.html#//02ss0000001t000000" rel="nofollow noopener noreferrer" target="_blank"&gt;10.5 NAServer REST interface&lt;/A&gt; called "&lt;STRONG&gt;overrides&lt;/STRONG&gt;", which I need to set. This parameter &lt;STRONG&gt;doesn't exist on the JS object RouteParameters&lt;/STRONG&gt;, and if I just add it to directions.routeParams, it won't go through to the request. (I've tried just assigning this.directions.routeParams.overrides, but I've also tried ES6's Object.assign in the Chrome dev console: The property is added to the routeParams object, but it's still not transferred to the request.)&lt;/P&gt;&lt;P&gt;Afaik, there is no later point for me to alter the request: The&amp;nbsp;Directions widgets&amp;nbsp;seems to implicitly call RouteTask.solve(routeParams), and there is no&amp;nbsp;pre-solve event or anything on the RouteTask to intercept the call.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Btw, the same goes for the 4.x API - no "overrides" parameter on RouteParameters.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Testing via the plain REST API test form (NAServer/Route/solve), I can set the "overrides" parameter and it works.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can someone help?&lt;BR /&gt;Thanks&lt;BR /&gt;Nik&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 16:26:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-add-the-quot-overrides-quot-property-to/m-p/402904#M37111</guid>
      <dc:creator>NiklasKöhn</dc:creator>
      <dc:date>2021-12-12T16:26:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to add the "overrides" property to RouteParameters?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-add-the-quot-overrides-quot-property-to/m-p/402905#M37112</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check out this other post as the solution might apply to this situation as well. &amp;nbsp;The solution involves modifying the request parameters before it's sent to the REST endpoint via the setRequestPreCallback() method (&lt;A class="link-titled" href="https://developers.arcgis.com/javascript/3/jsapi/esri.request-amd.html#esrirequest.setrequestprecallback" title="https://developers.arcgis.com/javascript/3/jsapi/esri.request-amd.html#esrirequest.setrequestprecallback"&gt;esri/request | API Reference | ArcGIS API for JavaScript 3.20&lt;/A&gt;&amp;nbsp;) Related Post:&lt;A href="https://community.esri.com/thread/195675"&gt;RouteTask Travel Mode&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 May 2017 17:32:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-add-the-quot-overrides-quot-property-to/m-p/402905#M37112</guid>
      <dc:creator>JohnGrayson</dc:creator>
      <dc:date>2017-05-31T17:32:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to add the "overrides" property to RouteParameters?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-add-the-quot-overrides-quot-property-to/m-p/402906#M37113</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;John,&lt;/P&gt;&lt;P&gt;thanks for the hint! I'm now just calling&amp;nbsp;&lt;/P&gt;&lt;PRE style="color: #000000; background-color: #ffffff; font-size: 9,0pt;"&gt;&lt;SPAN style="background-color: #e4e4ff;"&gt;esriRequest&lt;/SPAN&gt;.setRequestPreCallback(lang.hitch(&lt;SPAN style="color: #000080; font-weight: bold;"&gt;this&lt;/SPAN&gt;, &lt;SPAN style="color: #000080; font-weight: bold;"&gt;this&lt;/SPAN&gt;.&lt;SPAN style="color: #7a7a43;"&gt;setRouteParams&lt;/SPAN&gt;));&lt;/PRE&gt;&lt;P&gt;while esriRequest is not an instantiated object, but the class itself. I had no idea that I can use esriRequest&amp;nbsp;in that static&amp;nbsp;manner&amp;nbsp;(if that's what&amp;nbsp;you call it in JS).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again!&lt;BR /&gt;Nik&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/t5/tag/setRequestPreCallback/tg-p"&gt;#setRequestPreCallback&lt;/A&gt;‌&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Jun 2017 06:53:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-add-the-quot-overrides-quot-property-to/m-p/402906#M37113</guid>
      <dc:creator>NiklasKöhn</dc:creator>
      <dc:date>2017-06-02T06:53:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to add the "overrides" property to RouteParameters?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-add-the-quot-overrides-quot-property-to/m-p/402907#M37114</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Although my issue is solved, I'd still like to point out that I see two problems in the JS API here:&lt;/P&gt;&lt;UL style="padding: 0px 0px 0px 30px;"&gt;&lt;LI style="margin: 0.2em 0px;"&gt;The &lt;A href="https://developers.arcgis.com/javascript/3/jsapi/routeparameters-amd.html" style="color: #2989c5; text-decoration: none;" rel="nofollow noopener noreferrer" target="_blank"&gt;RouteParameters&lt;/A&gt; class is missing the "overrides" property. (also in &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-support-RouteParameters.html" rel="nofollow noopener noreferrer" target="_blank"&gt;JS API 4.x&lt;/A&gt;)&lt;/LI&gt;&lt;LI style="margin: 0.2em 0px;"&gt;Some of the RouteParameters can be set via directionsWidgetObject.routeParams and implicitly passed through to RouteTask.solve(). But the selection of properties that is exposed here seems pretty odd to me: While some important ones are missing (in fact, most of the RouteParameters properties are missing), I can totally bamboozle the Directions widget by misusing some of the properties provided.&amp;nbsp;&lt;SPAN style="color: #3d3d3d;"&gt;Just add this to the &lt;A href="https://developers.arcgis.com/javascript/3/sandbox/sandbox.html?sample=widget_directions_basic" style="color: #2989c5; text-decoration: none;" rel="nofollow noopener noreferrer" target="_blank"&gt;simple Directions sample&lt;/A&gt; after instantiating Directions:&lt;BR /&gt;&lt;/SPAN&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;directions.on("directions-start", function() {
 directions.routeParams.returnDirections = false;
 directions.routeParams.returnRoutes = true;
 });&lt;SPAN class="" style="border-right: 1px solid #999999; padding-top: 1em;"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/PRE&gt;Because the route summary is taken from the directions header, there will be no summary with these settings. If you also set returnRoutes=false,&amp;nbsp;you'll get an "route cannot be calculated" error.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would consider this a bug or at least awkward&amp;nbsp;design. &lt;A href="https://community.esri.com/migrated-users/6443" target="_blank"&gt;Rene Rubalcava&lt;/A&gt;‌, what do you think?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 18:22:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-add-the-quot-overrides-quot-property-to/m-p/402907#M37114</guid>
      <dc:creator>NiklasKöhn</dc:creator>
      <dc:date>2021-12-11T18:22:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to add the "overrides" property to RouteParameters?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-add-the-quot-overrides-quot-property-to/m-p/402908#M37115</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="https://community.esri.com/migrated-users/43956"&gt;Rene Rubalcava&lt;/A&gt;‌ no opinion, or did I link&amp;nbsp;the wrong profile of yours?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Jun 2017 12:32:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-add-the-quot-overrides-quot-property-to/m-p/402908#M37115</guid>
      <dc:creator>NiklasKöhn</dc:creator>
      <dc:date>2017-06-13T12:32:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to add the "overrides" property to RouteParameters?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-add-the-quot-overrides-quot-property-to/m-p/402909#M37116</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;One of those was right, ha.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Looking at recent activity, I think the overrides property&amp;nbsp;will be in 3.21. Not sure on 4x as there's lots of development currently happening around those modules, but we'll check.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As far as the design of what properties are passed to the REST API, I'm not too familiar with routing, but we'll look into it. Sometimes it's compatibility, but I couldn't say for sure.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Jun 2017 21:28:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-add-the-quot-overrides-quot-property-to/m-p/402909#M37116</guid>
      <dc:creator>ReneRubalcava</dc:creator>
      <dc:date>2017-06-13T21:28:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to add the "overrides" property to RouteParameters?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-add-the-quot-overrides-quot-property-to/m-p/402910#M37117</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Rene!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Jun 2017 07:00:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-add-the-quot-overrides-quot-property-to/m-p/402910#M37117</guid>
      <dc:creator>NiklasKöhn</dc:creator>
      <dc:date>2017-06-14T07:00:12Z</dc:date>
    </item>
  </channel>
</rss>

