<?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 GeoCoder Service doesn't work for Directions widget in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/geocoder-service-doesn-t-work-for-directions/m-p/1112049#M75101</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Im working with Directions widget under arcgis api 3.38 and want to change the GeoCoder service URL to work with my own GeoCoder service, but &lt;STRONG&gt;it doesnt work&lt;/STRONG&gt; , knowing that if I used the esri GeoCoder service it works correctly&lt;/P&gt;&lt;P&gt;var sources = [&lt;BR /&gt;{&lt;BR /&gt;locator: new Locator("&lt;A href="https://xxxxxxx/arcgis/rest/services/Adress_Locator/GeocodeServer" target="_blank"&gt;https://xxxxxxx/arcgis/rest/services/Adress_Locator/GeocodeServer&lt;/A&gt;"),&lt;BR /&gt;locationToAddressTemplate: "${City}, ${State}, ${Country}",&lt;BR /&gt;singleLineFieldName: "SingleLine",&lt;BR /&gt;outFields: ["City"],&lt;BR /&gt;localSearchOptions: {&lt;BR /&gt;minScale: 300000,&lt;BR /&gt;distance: 50000&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;}&lt;BR /&gt;];&lt;BR /&gt;var options = {&lt;BR /&gt;sources: sources&lt;BR /&gt;};&lt;BR /&gt;//default will point to ArcGIS world routing service&lt;BR /&gt;var directions = new Directions({&lt;BR /&gt;map: map,&lt;BR /&gt;showClearButton: true,&lt;BR /&gt;showSegmentPopup: false,&lt;BR /&gt;directionsLengthUnits: "esriMiles",&lt;BR /&gt;mapClickActive: true,&lt;BR /&gt;routeTaskUrl: "&lt;A href="https://xxxxxxxxx/arcgis/rest/services/CALCUL_ITINERAIRE/NAServer/Route" target="_blank"&gt;https://xxxxxxxxx/arcgis/rest/services/CALCUL_ITINERAIRE/NAServer/Route&lt;/A&gt;",&lt;BR /&gt;searchOptions: options&lt;BR /&gt;}, "dir");&lt;BR /&gt;directions.startup();&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could you please help me with that ?&lt;/P&gt;</description>
    <pubDate>Thu, 28 Oct 2021 12:10:06 GMT</pubDate>
    <dc:creator>benchikh</dc:creator>
    <dc:date>2021-10-28T12:10:06Z</dc:date>
    <item>
      <title>GeoCoder Service doesn't work for Directions widget</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/geocoder-service-doesn-t-work-for-directions/m-p/1112049#M75101</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Im working with Directions widget under arcgis api 3.38 and want to change the GeoCoder service URL to work with my own GeoCoder service, but &lt;STRONG&gt;it doesnt work&lt;/STRONG&gt; , knowing that if I used the esri GeoCoder service it works correctly&lt;/P&gt;&lt;P&gt;var sources = [&lt;BR /&gt;{&lt;BR /&gt;locator: new Locator("&lt;A href="https://xxxxxxx/arcgis/rest/services/Adress_Locator/GeocodeServer" target="_blank"&gt;https://xxxxxxx/arcgis/rest/services/Adress_Locator/GeocodeServer&lt;/A&gt;"),&lt;BR /&gt;locationToAddressTemplate: "${City}, ${State}, ${Country}",&lt;BR /&gt;singleLineFieldName: "SingleLine",&lt;BR /&gt;outFields: ["City"],&lt;BR /&gt;localSearchOptions: {&lt;BR /&gt;minScale: 300000,&lt;BR /&gt;distance: 50000&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;}&lt;BR /&gt;];&lt;BR /&gt;var options = {&lt;BR /&gt;sources: sources&lt;BR /&gt;};&lt;BR /&gt;//default will point to ArcGIS world routing service&lt;BR /&gt;var directions = new Directions({&lt;BR /&gt;map: map,&lt;BR /&gt;showClearButton: true,&lt;BR /&gt;showSegmentPopup: false,&lt;BR /&gt;directionsLengthUnits: "esriMiles",&lt;BR /&gt;mapClickActive: true,&lt;BR /&gt;routeTaskUrl: "&lt;A href="https://xxxxxxxxx/arcgis/rest/services/CALCUL_ITINERAIRE/NAServer/Route" target="_blank"&gt;https://xxxxxxxxx/arcgis/rest/services/CALCUL_ITINERAIRE/NAServer/Route&lt;/A&gt;",&lt;BR /&gt;searchOptions: options&lt;BR /&gt;}, "dir");&lt;BR /&gt;directions.startup();&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could you please help me with that ?&lt;/P&gt;</description>
      <pubDate>Thu, 28 Oct 2021 12:10:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/geocoder-service-doesn-t-work-for-directions/m-p/1112049#M75101</guid>
      <dc:creator>benchikh</dc:creator>
      <dc:date>2021-10-28T12:10:06Z</dc:date>
    </item>
    <item>
      <title>Re: GeoCoder Service doesn't work for Directions widget</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/geocoder-service-doesn-t-work-for-directions/m-p/1112076#M75104</link>
      <description>&lt;P&gt;It's difficult to tell from the code snippet. Couple questions that might help troubleshoot:&lt;/P&gt;&lt;P&gt;What do you mean by doesn't work? Is there an error message in the console? What does the network request to the locator look like? Are you sure the locator is working properly? Is the locator service configured to handle the defined property values correctly?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Oct 2021 13:43:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/geocoder-service-doesn-t-work-for-directions/m-p/1112076#M75104</guid>
      <dc:creator>Noah-Sager</dc:creator>
      <dc:date>2021-10-28T13:43:32Z</dc:date>
    </item>
    <item>
      <title>Re: GeoCoder Service doesn't work for Directions widget</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/geocoder-service-doesn-t-work-for-directions/m-p/1112092#M75106</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;It means that when I put my own GeoCoder code and enter an origin/Destination I got "no result found" message in the widget, and no error message appears on in the console.&lt;/P&gt;&lt;P&gt;I can confirm the locator(My GeoCoder) works fine as I have already tested it in an App Builder application.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;otherwise ,&amp;nbsp; I have solved the issue by working with a FeatureLayer instead of Locator like this:&lt;/P&gt;&lt;P&gt;var sourcesLayer = [&lt;BR /&gt;{&lt;/P&gt;&lt;P&gt;featureLayer: new FeatureLayer("&lt;A href="https://xxxxxxxxxx/arcgis/rest/services/TEST_SPATIAL/MapServer/0" target="_blank"&gt;https://xxxxxxxxxx/arcgis/rest/services/TEST_SPATIAL/MapServer/0&lt;/A&gt;"),&lt;BR /&gt;searchFields: ["DesignationPointTransport"],&lt;BR /&gt;suggestionTemplate: "${DesignationPointTransport}",&lt;BR /&gt;exactMatch: false,&lt;BR /&gt;outFields: ["*"],&lt;BR /&gt;name: "Senators",&lt;BR /&gt;labelSymbol: "t",&lt;BR /&gt;placeholder: "Senator name",&lt;BR /&gt;maxResults: 6,&lt;BR /&gt;maxSuggestions: 6,&lt;BR /&gt;enableSuggestions: true,&lt;BR /&gt;minCharacters: 0,&lt;BR /&gt;localSearchOptions: { distance: 50000 }&lt;/P&gt;&lt;P&gt;}&lt;BR /&gt;];&lt;/P&gt;</description>
      <pubDate>Thu, 28 Oct 2021 14:01:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/geocoder-service-doesn-t-work-for-directions/m-p/1112092#M75106</guid>
      <dc:creator>benchikh</dc:creator>
      <dc:date>2021-10-28T14:01:37Z</dc:date>
    </item>
  </channel>
</rss>

