<?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: Geocoder: Triggering the display of candidate addresses in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/geocoder-triggering-the-display-of-candidate/m-p/370825#M34395</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;thanks for the additional clarification.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;i guess you're caught kinda halfway in between here, but to me its starting to sound like you'd be better off using &lt;/SPAN&gt;&lt;A href="https://developers.arcgis.com/javascript/jsapi/esri.request-amd.html"&gt;esriRequest()&lt;/A&gt;&lt;SPAN&gt; to make your own call to our &lt;/SPAN&gt;&lt;A href="http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#/Working_with_suggestions/02r300000238000000/"&gt;suggestion service&lt;/A&gt;&lt;SPAN&gt; and handling the results however you want.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 11 Jun 2014 19:26:47 GMT</pubDate>
    <dc:creator>JohnGravois</dc:creator>
    <dc:date>2014-06-11T19:26:47Z</dc:date>
    <item>
      <title>Geocoder: Triggering the display of candidate addresses</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/geocoder-triggering-the-display-of-candidate/m-p/370822#M34392</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;From elsewhere in my application,&amp;nbsp; I want to be able put an address in the Geocoder and trigger the display of candidate addresses so that the user can pick one. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This code accomplishes the first goal -- getting a string&amp;nbsp; into the Geocoder:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;simplemap.geocoder.focus();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;$geocoderInput = $dom.find("#simplemap_divGeocoder_input");&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;$geocoderInput.val("100 W Peachtree, Atlanta, GA");&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But I have not been able to find a way to trigger the display of candidate addresses so that the user can pick one. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;This statement &lt;/SPAN&gt;&lt;SPAN style="text-decoration:underline;"&gt;doesn't&lt;/SPAN&gt;&lt;SPAN&gt; work:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;$geocoderInput.trigger("keyup");&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Neither did the other triggers ("keydown", "keypress") or combinations thereof.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;From looking at the Geocoder code on GitHub*, it seems like the "keyup" trigger, once we have more than a couple of characters of text in the input box, should work.&amp;nbsp; But it doesn't.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The Geocoder only seems to respond to actual key presses on the keyboard. How does it know the difference between an actual keypress and the event which says this happened?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks in advance for any help or insights.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;*&lt;/SPAN&gt;&lt;A href="https://github.com/Esri/arcgis-dijit-geocoder-js"&gt;https://github.com/Esri/arcgis-dijit-geocoder-js&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Jun 2014 02:40:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/geocoder-triggering-the-display-of-candidate/m-p/370822#M34392</guid>
      <dc:creator>DonaldWood</dc:creator>
      <dc:date>2014-06-10T02:40:55Z</dc:date>
    </item>
    <item>
      <title>Re: Geocoder: Triggering the display of candidate addresses</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/geocoder-triggering-the-display-of-candidate/m-p/370823#M34393</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;donald,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;welcome to our forums &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;you won't have a reference to any candidates until after you call geocoder.find() and wait for a &lt;/SPAN&gt;&lt;A href="https://developers.arcgis.com/javascript/jsapi/geocoder-amd.html#event-find-results" rel="nofollow noopener noreferrer" target="_blank"&gt;callback&lt;/A&gt;&lt;SPAN&gt; with the results from the geocoding service itself...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
geocoder.find();
geocoder.on("find-results", function(evt) {
&amp;nbsp; console.log(evt.results);
});
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 17:11:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/geocoder-triggering-the-display-of-candidate/m-p/370823#M34393</guid>
      <dc:creator>JohnGravois</dc:creator>
      <dc:date>2021-12-11T17:11:01Z</dc:date>
    </item>
    <item>
      <title>Re: Geocoder: Triggering the display of candidate addresses</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/geocoder-triggering-the-display-of-candidate/m-p/370824#M34394</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks for the Welcome and the quick response, John.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Your suggestion would work fine if I was trying to have my program process the candidates and display them in some UI that it had built. But I'm trying to let the user see the candidates, right below the geocoder widget.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;To put it another way, I want the geocoder to behave as if the user had typed in the address, and the AutoComplete function had fired, displaying a list of candidates.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Looking at the code on GitHub, I want to somehow trigger the _inputKeyUp function [line 1084], which will notice that I've set the AutoComplete option and that enough characters have been typed in [line 1117] and invoke this._autoComplete()&amp;nbsp; [line 1118], which runs the query [line 732] and does the this._showResults [line 739].&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I just can't figure out how to trigger the _inputKeyUp. It seems to be listening for it:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;on(this.inputNode, "keyup" [line 1049]. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;But my doing $geocoderInput.trigger("keyup"); doesn't seem to be getting through.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Doing an "Inspect Element" from Chrome,&amp;nbsp; I see that this is the correct DOM element:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;input aria-haspopup="true" id="simplemap_divGeocoder_input"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;tabindex="0" placeholder="" value="" autocomplete="off" type="text"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;data-dojo-attach-point="inputNode"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;data-dojo-attach-event="ondijitclick:_inputClick"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;role="textbox"&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I don't know dojo, but this seems to be saying that it will pass a click event to that "attach-point".&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;(I don't think the autocomplete="off" is relevant or having an effect. The AutoComplete functionality definitely works when I type in characters manually.)&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Jun 2014 00:49:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/geocoder-triggering-the-display-of-candidate/m-p/370824#M34394</guid>
      <dc:creator>DonaldWood</dc:creator>
      <dc:date>2014-06-11T00:49:56Z</dc:date>
    </item>
    <item>
      <title>Re: Geocoder: Triggering the display of candidate addresses</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/geocoder-triggering-the-display-of-candidate/m-p/370825#M34395</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;thanks for the additional clarification.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;i guess you're caught kinda halfway in between here, but to me its starting to sound like you'd be better off using &lt;/SPAN&gt;&lt;A href="https://developers.arcgis.com/javascript/jsapi/esri.request-amd.html"&gt;esriRequest()&lt;/A&gt;&lt;SPAN&gt; to make your own call to our &lt;/SPAN&gt;&lt;A href="http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#/Working_with_suggestions/02r300000238000000/"&gt;suggestion service&lt;/A&gt;&lt;SPAN&gt; and handling the results however you want.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Jun 2014 19:26:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/geocoder-triggering-the-display-of-candidate/m-p/370825#M34395</guid>
      <dc:creator>JohnGravois</dc:creator>
      <dc:date>2014-06-11T19:26:47Z</dc:date>
    </item>
    <item>
      <title>Re: Geocoder: Triggering the display of candidate addresses</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/geocoder-triggering-the-display-of-candidate/m-p/370826#M34396</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Donald,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You should just be able to call this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
myWidget.set("value", "my location");
myWidget._autoComplete();&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It's currently not a public function but it should do what you are looking for I believe.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Let me know if that helps.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I will look into making this function public for a future release.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 17:11:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/geocoder-triggering-the-display-of-candidate/m-p/370826#M34396</guid>
      <dc:creator>MattDriscoll</dc:creator>
      <dc:date>2021-12-11T17:11:03Z</dc:date>
    </item>
    <item>
      <title>Re: Geocoder: Triggering the display of candidate addresses</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/geocoder-triggering-the-display-of-candidate/m-p/370827#M34397</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks, Matt.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The first statement is working (so I know I'm talking to the right Widget). &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;But the second statement causes this error: "Uncaught TypeError: undefined is not a function".&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;require([..."esri/dijit/Geocoder", ...], function(...esriGeocoder, ...) &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But I guess I need to do something more to make that internal function visible.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Jun 2014 20:51:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/geocoder-triggering-the-display-of-candidate/m-p/370827#M34397</guid>
      <dc:creator>DonaldWood</dc:creator>
      <dc:date>2014-06-11T20:51:23Z</dc:date>
    </item>
    <item>
      <title>Re: Geocoder: Triggering the display of candidate addresses</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/geocoder-triggering-the-display-of-candidate/m-p/370828#M34398</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;donald,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;can you put together some sample code?&amp;nbsp; matt's suggestion worked for me...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://jsfiddle.net/jagravois/Wv4a6/"&gt;http://jsfiddle.net/jagravois/Wv4a6/&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Jun 2014 20:56:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/geocoder-triggering-the-display-of-candidate/m-p/370828#M34398</guid>
      <dc:creator>JohnGravois</dc:creator>
      <dc:date>2014-06-11T20:56:28Z</dc:date>
    </item>
    <item>
      <title>Re: Geocoder: Triggering the display of candidate addresses</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/geocoder-triggering-the-display-of-candidate/m-p/370829#M34399</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thank you, both.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I can run the code in the jFiddle.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But in my system, the _autoComplete() function is being exposed as _autocomplete(). &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;See image below, from the Developer Tools window in Chrome:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;[ATTACH=CONFIG]34514[/ATTACH]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;And this code works perfectly for me:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; simplemapp.geocoder.set("value", searchString);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; simplemapp.geocoder._autocomplete();&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So we've solved my problem but created a mystery!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Jun 2014 21:29:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/geocoder-triggering-the-display-of-candidate/m-p/370829#M34399</guid>
      <dc:creator>DonaldWood</dc:creator>
      <dc:date>2014-06-11T21:29:51Z</dc:date>
    </item>
  </channel>
</rss>

