<?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: Directions Widget: Prevent zoom to full route after the route is calculated in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/directions-widget-prevent-zoom-to-full-route-after/m-p/150554#M14022</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Robert,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This sample shows an example:&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://developers.arcgis.com/javascript/3/sandbox/sandbox.html?sample=widget_directions_basic" title="https://developers.arcgis.com/javascript/3/sandbox/sandbox.html?sample=widget_directions_basic"&gt;ArcGIS API for JavaScript Sandbox&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After two cities are entered, the list of steps is populated and the map zooms in to the full extent of the route. I was wondering if it is possible to show the steps and highlight the route on the map, but leave the map extent as is.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 09 May 2017 17:22:50 GMT</pubDate>
    <dc:creator>MaxMcCosham</dc:creator>
    <dc:date>2017-05-09T17:22:50Z</dc:date>
    <item>
      <title>Directions Widget: Prevent zoom to full route after the route is calculated</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/directions-widget-prevent-zoom-to-full-route-after/m-p/150552#M14020</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm using the Directions widget in version 3.20 of the API:&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://developers.arcgis.com/javascript/3/jsapi/directions-amd.html" title="https://developers.arcgis.com/javascript/3/jsapi/directions-amd.html"&gt;Directions | API Reference | ArcGIS API for JavaScript 3.20&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is it possible to prevent the zoomToFullRoute() method from being called after the route is calculated? I would like to keep the map at its current extent instead of automatically zooming in/out to the calculated route.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 May 2017 15:48:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/directions-widget-prevent-zoom-to-full-route-after/m-p/150552#M14020</guid>
      <dc:creator>MaxMcCosham</dc:creator>
      <dc:date>2017-05-08T15:48:22Z</dc:date>
    </item>
    <item>
      <title>Re: Directions Widget: Prevent zoom to full route after the route is calculated</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/directions-widget-prevent-zoom-to-full-route-after/m-p/150553#M14021</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Max,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;I am not seeing the map zoom to the calculated route unless I click on the route directions results.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 May 2017 14:32:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/directions-widget-prevent-zoom-to-full-route-after/m-p/150553#M14021</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2017-05-09T14:32:46Z</dc:date>
    </item>
    <item>
      <title>Re: Directions Widget: Prevent zoom to full route after the route is calculated</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/directions-widget-prevent-zoom-to-full-route-after/m-p/150554#M14022</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Robert,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This sample shows an example:&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://developers.arcgis.com/javascript/3/sandbox/sandbox.html?sample=widget_directions_basic" title="https://developers.arcgis.com/javascript/3/sandbox/sandbox.html?sample=widget_directions_basic"&gt;ArcGIS API for JavaScript Sandbox&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After two cities are entered, the list of steps is populated and the map zooms in to the full extent of the route. I was wondering if it is possible to show the steps and highlight the route on the map, but leave the map extent as is.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 May 2017 17:22:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/directions-widget-prevent-zoom-to-full-route-after/m-p/150554#M14022</guid>
      <dc:creator>MaxMcCosham</dc:creator>
      <dc:date>2017-05-09T17:22:50Z</dc:date>
    </item>
    <item>
      <title>Re: Directions Widget: Prevent zoom to full route after the route is calculated</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/directions-widget-prevent-zoom-to-full-route-after/m-p/150555#M14023</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Max,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;try overriding the Directions class like this:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; NoZoomDirections &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;declare&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;Directions&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; zoomToFullRoute&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;function&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; console&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;log&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"overriding zoomToFullRoute"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;

&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; directionsWidget &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;new&lt;/SPAN&gt; &lt;SPAN class="token class-name"&gt;NoZoomDirections&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="comment token"&gt;/*... the usual instantiation */&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&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;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Works for me. I only get the console message, not the zoom.&lt;/P&gt;&lt;P&gt;If you want to have the zoomToFullRoute() functionality in &lt;STRONG&gt;some&lt;/STRONG&gt; cases, you'd need to add&amp;nbsp;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;this.inherited(arguments);&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;into the new function body along with a conditional statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;About what you and &lt;A href="https://community.esri.com/migrated-users/3101" target="_blank"&gt;Robert Scheitlin, GISP&lt;/A&gt;‌ said about when the map is automatically zoomed in or not: I've had exactly that issue&amp;nbsp;and described it here:&amp;nbsp;&lt;A _jive_internal="true" href="https://community.esri.com/message/695802-zoom-button-and-auto-zoom-in-directions-widget" target="_blank"&gt;Zoom button and auto zoom in Directions widget&lt;/A&gt;. Maybe you could take a look at it and verify the problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Nik&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 08:06:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/directions-widget-prevent-zoom-to-full-route-after/m-p/150555#M14023</guid>
      <dc:creator>NiklasKöhn</dc:creator>
      <dc:date>2021-12-11T08:06:58Z</dc:date>
    </item>
    <item>
      <title>Re: Directions Widget: Prevent zoom to full route after the route is calculated</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/directions-widget-prevent-zoom-to-full-route-after/m-p/150556#M14024</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Niklas, this works for me. Hopefully the manual zoom button is added again as an option.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Jun 2017 15:52:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/directions-widget-prevent-zoom-to-full-route-after/m-p/150556#M14024</guid>
      <dc:creator>MaxMcCosham</dc:creator>
      <dc:date>2017-06-27T15:52:23Z</dc:date>
    </item>
  </channel>
</rss>

