<?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 Custom Locator w/ Search Dijit in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/custom-locator-w-search-dijit/m-p/518724#M48354</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, I am having trouble implementing a custom locator task to be a source inside my existing Search dijit.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've built a US Addresses Single House Address Locator from our customer data as I am unable to access ESRI's World Geocoding service from inside the company network.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Address locator works in ArcGIS Desktop when I try it out, but I can't seem to get it to work in my JS app. Can't find any help on the JS API reference or forums elsewhere on how exactly to get this working. This seems like a straightforward problem but it evades me. Either says no results found or just keeps spinning like it's searching, depending how I tweak it. Any help is appreciated!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;require([
&amp;nbsp;&amp;nbsp;&amp;nbsp; "esri/map",
&amp;nbsp;&amp;nbsp;&amp;nbsp; "esri/dijit/Search",
&amp;nbsp;&amp;nbsp;&amp;nbsp; "esri/tasks/locator"
], function (
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Map,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Search,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Locator
) {

var map = new Map("mapDiv", {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; basemap: "streets",
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; center: [-84.6, 38.9],
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; zoom: 11,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; infoWindow: popup,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sliderStyle: "large"
&amp;nbsp;&amp;nbsp;&amp;nbsp; });
&amp;nbsp;&amp;nbsp;&amp;nbsp; map.on("load", mapReady);

var s = new Search({
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sources: [],
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; enableButtonMode: false,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; enableLabel: false,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; enableInfoWindow: true,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; showInfoWindowOnSelect: true,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; zoomScale: 10000,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; map: map
&amp;nbsp;&amp;nbsp;&amp;nbsp; }, "search");
&amp;nbsp;&amp;nbsp;&amp;nbsp; s.startup();

var locator = new Locator("&lt;A href="http://myserver.mycompany.com/ArcGIS/rest/services/INFORMATICA_SHAPE_WM_2_AddrLoc/GeocodeServer" rel="nofollow noopener noreferrer" target="_blank"&gt;http://MYSERVER.MYCOMPANY.com/ArcGIS/rest/services/INFORMATICA_SHAPE_WM_2_AddrLoc/GeocodeServer&lt;/A&gt;");

var sources = s.get("sources")
&amp;nbsp;&amp;nbsp;&amp;nbsp; sources.push({
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; locator: locator,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; name: "Address Search",
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; singleLineFieldName: "Single Line Input",
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; placeholder: "Find address or place",
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; minCharacters: 8,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; outFields: ["*"]
&amp;nbsp;&amp;nbsp;&amp;nbsp; });
s.set("sources", sources);&lt;/PRE&gt;&lt;P&gt;&lt;IMG __jive_id="139287" class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/139287_pastedImage_5.png" style="max-height: 900px; max-width: 1200px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="139288" class="image-2 jive-image" src="https://community.esri.com/legacyfs/online/139288_pastedImage_15.png" style="max-height: 900px; max-width: 1200px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-3 jive-image" src="https://community.esri.com/legacyfs/online/139584_pastedImage_1.png" style="max-height: 900px; max-width: 1200px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Dec 2021 22:37:58 GMT</pubDate>
    <dc:creator>alexmoore</dc:creator>
    <dc:date>2021-12-11T22:37:58Z</dc:date>
    <item>
      <title>Custom Locator w/ Search Dijit</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/custom-locator-w-search-dijit/m-p/518724#M48354</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, I am having trouble implementing a custom locator task to be a source inside my existing Search dijit.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've built a US Addresses Single House Address Locator from our customer data as I am unable to access ESRI's World Geocoding service from inside the company network.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Address locator works in ArcGIS Desktop when I try it out, but I can't seem to get it to work in my JS app. Can't find any help on the JS API reference or forums elsewhere on how exactly to get this working. This seems like a straightforward problem but it evades me. Either says no results found or just keeps spinning like it's searching, depending how I tweak it. Any help is appreciated!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;require([
&amp;nbsp;&amp;nbsp;&amp;nbsp; "esri/map",
&amp;nbsp;&amp;nbsp;&amp;nbsp; "esri/dijit/Search",
&amp;nbsp;&amp;nbsp;&amp;nbsp; "esri/tasks/locator"
], function (
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Map,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Search,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Locator
) {

var map = new Map("mapDiv", {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; basemap: "streets",
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; center: [-84.6, 38.9],
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; zoom: 11,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; infoWindow: popup,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sliderStyle: "large"
&amp;nbsp;&amp;nbsp;&amp;nbsp; });
&amp;nbsp;&amp;nbsp;&amp;nbsp; map.on("load", mapReady);

var s = new Search({
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sources: [],
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; enableButtonMode: false,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; enableLabel: false,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; enableInfoWindow: true,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; showInfoWindowOnSelect: true,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; zoomScale: 10000,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; map: map
&amp;nbsp;&amp;nbsp;&amp;nbsp; }, "search");
&amp;nbsp;&amp;nbsp;&amp;nbsp; s.startup();

var locator = new Locator("&lt;A href="http://myserver.mycompany.com/ArcGIS/rest/services/INFORMATICA_SHAPE_WM_2_AddrLoc/GeocodeServer" rel="nofollow noopener noreferrer" target="_blank"&gt;http://MYSERVER.MYCOMPANY.com/ArcGIS/rest/services/INFORMATICA_SHAPE_WM_2_AddrLoc/GeocodeServer&lt;/A&gt;");

var sources = s.get("sources")
&amp;nbsp;&amp;nbsp;&amp;nbsp; sources.push({
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; locator: locator,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; name: "Address Search",
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; singleLineFieldName: "Single Line Input",
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; placeholder: "Find address or place",
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; minCharacters: 8,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; outFields: ["*"]
&amp;nbsp;&amp;nbsp;&amp;nbsp; });
s.set("sources", sources);&lt;/PRE&gt;&lt;P&gt;&lt;IMG __jive_id="139287" class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/139287_pastedImage_5.png" style="max-height: 900px; max-width: 1200px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="139288" class="image-2 jive-image" src="https://community.esri.com/legacyfs/online/139288_pastedImage_15.png" style="max-height: 900px; max-width: 1200px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-3 jive-image" src="https://community.esri.com/legacyfs/online/139584_pastedImage_1.png" style="max-height: 900px; max-width: 1200px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 22:37:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/custom-locator-w-search-dijit/m-p/518724#M48354</guid>
      <dc:creator>alexmoore</dc:creator>
      <dc:date>2021-12-11T22:37:58Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Locator w/ Search Dijit</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/custom-locator-w-search-dijit/m-p/518725#M48355</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm assuming you saw &lt;A _jive_internal="true" href="https://community.esri.com/thread/166360"&gt;this thread&lt;/A&gt; which addresses the same issue? Do you see any errors thrown in the console of the browser? Any network errors returned with the request?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does the Geocoder work if you submit a request through the REST directory endpoint?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="restEndpointQuery.jpg" class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/139600_restEndpointQuery.jpg" style="width: 620px; height: 303px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Nov 2015 15:59:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/custom-locator-w-search-dijit/m-p/518725#M48355</guid>
      <dc:creator>SteveCole</dc:creator>
      <dc:date>2015-11-06T15:59:01Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Locator w/ Search Dijit</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/custom-locator-w-search-dijit/m-p/518726#M48356</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;After thinking about the issue I'm currently having, it might just be a boneheaded mistake by myself. I am trying to fix it real quick...will update when I know if it worked or not.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Nov 2015 16:19:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/custom-locator-w-search-dijit/m-p/518726#M48356</guid>
      <dc:creator>alexmoore</dc:creator>
      <dc:date>2015-11-06T16:19:11Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Locator w/ Search Dijit</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/custom-locator-w-search-dijit/m-p/518727#M48357</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well my quick fix did not work...not sure what I'm doing wrong here. I have point data with all the necessary fields in the correct spatial reference, I get no errors in creating the Locator. I use the locator in ArcGIS Desktop with no problems...it publishes to our ArcServer successfully...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I did try in the REST endpoint to &lt;EM&gt;Find Address Candidates &lt;/EM&gt;and also the &lt;EM&gt;Reverse Geocode &lt;/EM&gt;option and it never came back with results...I just get this...&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="140775" class="image-2 jive-image" src="https://community.esri.com/legacyfs/online/140775_pastedImage_2.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And when I look in the console as I try to call the Locator, I get quite a few errors...ugh. Doesn't look good.&lt;/P&gt;&lt;P&gt;I didn't expect it to work when I called it in the app as I can't even get results in the endpoint, so hopefully when I get it to work in the services directory these errors will disappear. I hope.&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="140774" class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/140774_pastedImage_1.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Nov 2015 14:19:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/custom-locator-w-search-dijit/m-p/518727#M48357</guid>
      <dc:creator>alexmoore</dc:creator>
      <dc:date>2015-11-09T14:19:30Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Locator w/ Search Dijit</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/custom-locator-w-search-dijit/m-p/518728#M48358</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I got frustrated and just decided to concatenate all my address data into one field and create a General Single Field address locator. Seems to have done the trick! I am able to get Address Candidates and Reverse geocode from the rest endpoint, and have successfully integrated it into my default Search dijit.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the debugging help Steve.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Nov 2015 20:34:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/custom-locator-w-search-dijit/m-p/518728#M48358</guid>
      <dc:creator>alexmoore</dc:creator>
      <dc:date>2015-11-09T20:34:45Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Locator w/ Search Dijit</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/custom-locator-w-search-dijit/m-p/518729#M48359</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Cool. Glad you got it working!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Nov 2015 21:01:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/custom-locator-w-search-dijit/m-p/518729#M48359</guid>
      <dc:creator>SteveCole</dc:creator>
      <dc:date>2015-11-09T21:01:41Z</dc:date>
    </item>
  </channel>
</rss>

