<?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: Add ShowSaveButton on Directiosn Widget arcgis api 3.38 in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/add-showsavebutton-on-directiosn-widget-arcgis-api/m-p/1112014#M75098</link>
    <description>&lt;P&gt;Thanks again for your help, I have tried your code above, but got the following error &lt;STRONG&gt;"domConstruct.toDom is not a function"&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;below is my declaration, Im a beginner so your help would be much appreciated&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;require([ "esri/map", "esri/dijit/Directions", "dojo/parser", "esri/tasks/locator", "esri/tasks/FeatureSet", "esri/tasks/DirectionsFeatureSet", "dijit/layout/BorderContainer", "dijit/layout/ContentPane", "dojo/dom-construct", "dojo/dom", "dojo/on", "dojo/domReady!" ], function ( Map, Directions, parser, Locator, FeatureSet, DirectionsFeatureSet, domConstruct, dom, on&lt;/STRONG&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 28 Oct 2021 08:42:45 GMT</pubDate>
    <dc:creator>benchikh</dc:creator>
    <dc:date>2021-10-28T08:42:45Z</dc:date>
    <item>
      <title>Add ShowSaveButton on Directiosn Widget arcgis api 3.38</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/add-showsavebutton-on-directiosn-widget-arcgis-api/m-p/1111575#M75085</link>
      <description>&lt;P&gt;Im working with Directions Widget with arcgis JS version 3.38 and want to display the Save button on the widget, so I have added the ShowSabeButton parameter. But still can't displayed on the widget!&lt;/P&gt;&lt;PRE&gt; &lt;SPAN class=""&gt;var&lt;/SPAN&gt; directionsW = &lt;SPAN class=""&gt;new&lt;/SPAN&gt; &lt;SPAN class=""&gt;Directions&lt;/SPAN&gt;({
            &lt;SPAN class=""&gt;map&lt;/SPAN&gt;: map,
            &lt;SPAN class=""&gt;routeTaskUrl&lt;/SPAN&gt;:                   
             &lt;SPAN class=""&gt;"https://192.168.7.45:6443/arcgis/rest/services/CALCUL_ITINERAIRE/NAServer/Route"&lt;/SPAN&gt;,
            **&lt;SPAN class=""&gt;showSaveButton&lt;/SPAN&gt;: &lt;SPAN class=""&gt;true&lt;/SPAN&gt;**&lt;/PRE&gt;&lt;P&gt;Can anyone help me with this please?&lt;/P&gt;</description>
      <pubDate>Wed, 27 Oct 2021 11:38:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/add-showsavebutton-on-directiosn-widget-arcgis-api/m-p/1111575#M75085</guid>
      <dc:creator>benchikh</dc:creator>
      <dc:date>2021-10-27T11:38:46Z</dc:date>
    </item>
    <item>
      <title>Re: Add ShowSaveButton on Directiosn Widget arcgis api 3.38</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/add-showsavebutton-on-directiosn-widget-arcgis-api/m-p/1111586#M75087</link>
      <description>&lt;P&gt;Not sure if this helps, but the save button sounds like it will be shown if your network service is on ArcGIS Online or Portal.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;A href="https://developers.arcgis.com/javascript/3/jsapi/directions-amd.html#showsavebutton" target="_blank" rel="noopener"&gt;https://developers.arcgis.com/javascript/3/jsapi/directions-amd.html#showsavebutton&lt;/A&gt;&lt;BR /&gt;&lt;EM&gt;"Applicable if the widget works with a Network Analyst Server federated with ArcGIS Online or Portal. In addition, the widget may display this button in instances where it's needed to save and share routes with Navigator or other client applications.&amp;nbsp;(Added at v3.17)"&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;You could always create your own save button in JavaScript that mimics the default ArcGIS one by applying the same CSS.&amp;nbsp; Something like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;const savePrintButtonContainer = this.map.directions._savePrintBtnContainer;
const savebtn = domConstruct.toDom(
							"&amp;lt;div tabIndex='0' role='button' class='esriResultsSave esriDirectionsButton esriDirectionsTabButton' data-blur-on-click='true' data-dojo-attach-point='saveBtn' title='Save Route' id='saveButton' style='display: none;'&amp;gt; \
						&amp;lt;/div&amp;gt;");
this._saveButton = domConstruct.place(savebtn, savePrintButtonContainer, "last");
						
$(this._saveButton).on("click", this.saveRoute.bind(this));&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Oct 2021 13:41:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/add-showsavebutton-on-directiosn-widget-arcgis-api/m-p/1111586#M75087</guid>
      <dc:creator>AndyWhitaker1</dc:creator>
      <dc:date>2021-10-27T13:41:02Z</dc:date>
    </item>
    <item>
      <title>Re: Add ShowSaveButton on Directiosn Widget arcgis api 3.38</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/add-showsavebutton-on-directiosn-widget-arcgis-api/m-p/1111609#M75088</link>
      <description>&lt;P&gt;Another option is to try your route service in the sample below to make sure it works (uncomment line 51).&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/javascript/3/sandbox/sandbox.html?sample=widget_directions_basic" target="_blank"&gt;https://developers.arcgis.com/javascript/3/sandbox/sandbox.html?sample=widget_directions_basic&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Oct 2021 13:34:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/add-showsavebutton-on-directiosn-widget-arcgis-api/m-p/1111609#M75088</guid>
      <dc:creator>Noah-Sager</dc:creator>
      <dc:date>2021-10-27T13:34:34Z</dc:date>
    </item>
    <item>
      <title>Re: Add ShowSaveButton on Directiosn Widget arcgis api 3.38</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/add-showsavebutton-on-directiosn-widget-arcgis-api/m-p/1112011#M75096</link>
      <description>&lt;P&gt;Many thanks for your reply, I will try doing your suggestions and let you know !&lt;/P&gt;</description>
      <pubDate>Thu, 28 Oct 2021 08:29:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/add-showsavebutton-on-directiosn-widget-arcgis-api/m-p/1112011#M75096</guid>
      <dc:creator>benchikh</dc:creator>
      <dc:date>2021-10-28T08:29:39Z</dc:date>
    </item>
    <item>
      <title>Re: Add ShowSaveButton on Directiosn Widget arcgis api 3.38</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/add-showsavebutton-on-directiosn-widget-arcgis-api/m-p/1112012#M75097</link>
      <description>&lt;P&gt;Yes, My route service works fine, except that I cannot see the savebtn .&lt;/P&gt;</description>
      <pubDate>Thu, 28 Oct 2021 08:30:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/add-showsavebutton-on-directiosn-widget-arcgis-api/m-p/1112012#M75097</guid>
      <dc:creator>benchikh</dc:creator>
      <dc:date>2021-10-28T08:30:19Z</dc:date>
    </item>
    <item>
      <title>Re: Add ShowSaveButton on Directiosn Widget arcgis api 3.38</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/add-showsavebutton-on-directiosn-widget-arcgis-api/m-p/1112014#M75098</link>
      <description>&lt;P&gt;Thanks again for your help, I have tried your code above, but got the following error &lt;STRONG&gt;"domConstruct.toDom is not a function"&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;below is my declaration, Im a beginner so your help would be much appreciated&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;require([ "esri/map", "esri/dijit/Directions", "dojo/parser", "esri/tasks/locator", "esri/tasks/FeatureSet", "esri/tasks/DirectionsFeatureSet", "dijit/layout/BorderContainer", "dijit/layout/ContentPane", "dojo/dom-construct", "dojo/dom", "dojo/on", "dojo/domReady!" ], function ( Map, Directions, parser, Locator, FeatureSet, DirectionsFeatureSet, domConstruct, dom, on&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Oct 2021 08:42:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/add-showsavebutton-on-directiosn-widget-arcgis-api/m-p/1112014#M75098</guid>
      <dc:creator>benchikh</dc:creator>
      <dc:date>2021-10-28T08:42:45Z</dc:date>
    </item>
    <item>
      <title>Re: Add ShowSaveButton on Directiosn Widget arcgis api 3.38</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/add-showsavebutton-on-directiosn-widget-arcgis-api/m-p/1112067#M75103</link>
      <description>&lt;P&gt;The function arguments have to be in the same order as the require modules:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;require([ "esri/map", "esri/dijit/Directions", "dojo/parser", "esri/tasks/locator", "esri/tasks/FeatureSet", "esri/tasks/DirectionsFeatureSet", "dojo/dom-construct", "dojo/dom", "dojo/on", "dijit/layout/BorderContainer", "dijit/layout/ContentPane", "dojo/domReady!" ], 
function ( Map, Directions, parser, Locator, FeatureSet, DirectionsFeatureSet, domConstruct, dom, on&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 28 Oct 2021 13:16:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/add-showsavebutton-on-directiosn-widget-arcgis-api/m-p/1112067#M75103</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2021-10-28T13:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Add ShowSaveButton on Directiosn Widget arcgis api 3.38</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/add-showsavebutton-on-directiosn-widget-arcgis-api/m-p/1112101#M75107</link>
      <description>&lt;P&gt;Many thanks looks like the error message now is changed to&amp;nbsp; "&lt;STRONG&gt;_savePrintBtnContainer" &lt;/STRONG&gt;is not recognized in the below instruction : (knowing that I have a div with "&lt;STRONG&gt;_savePrintBtnContainer" &lt;/STRONG&gt;class name)&lt;/P&gt;&lt;P&gt;const savePrintButtonContainer = this.map.directions.&lt;STRONG&gt;_savePrintBtnContainer&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;ERROR : Cannot read properties of undefined (reading '_savePrintBtnContainer')&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Oct 2021 14:32:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/add-showsavebutton-on-directiosn-widget-arcgis-api/m-p/1112101#M75107</guid>
      <dc:creator>benchikh</dc:creator>
      <dc:date>2021-10-28T14:32:23Z</dc:date>
    </item>
    <item>
      <title>Re: Add ShowSaveButton on Directiosn Widget arcgis api 3.38</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/add-showsavebutton-on-directiosn-widget-arcgis-api/m-p/1112118#M75108</link>
      <description>&lt;P&gt;This code works in the &lt;A href="https://developers.arcgis.com/javascript/3/jssamples/widget_directions_basic.html" target="_self"&gt;sample&lt;/A&gt;. It gets the container directly from the widget, but has to wait until the widget is loaded&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;directions.on("load", function(){
  const savePrintButtonContainer = directions._savePrintBtnContainer;
  console.log(savePrintButtonContainer);
});&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Oct 2021 14:46:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/add-showsavebutton-on-directiosn-widget-arcgis-api/m-p/1112118#M75108</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2021-10-28T14:46:35Z</dc:date>
    </item>
  </channel>
</rss>

