<?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: autoSelect on Search dijit not working in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/autoselect-on-search-dijit-not-working/m-p/219505#M20357</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It appears that the autoSelect works fine without setting the extent on the search widget. Thanks goes to Kristian Ekenes of Esri for the answer.&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.5pt; color: black;"&gt;Hi Jeff,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.5pt; color: black;"&gt;Thanks for sending us the feedback. I can reproduce this using your sample. It looks like the World Geocoding Service will get a response from suggestLocations, but not the “search” when you have an extent set on the source: &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;OL style="list-style-type: lower-alpha;"&gt;&lt;LI&gt;&lt;SPAN style="color: black; font-size: 10.5pt;"&gt;&lt;EM&gt;search.sources[0].searchExtent = searchExtent;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;/P&gt;.......&lt;BR /&gt;&lt;BR /&gt;&lt;P&gt;&lt;SPAN style="color: black; font-size: 9.0pt; font-family: 'Verdana','sans-serif';"&gt;&lt;STRONG&gt;Kristian Ekenes&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN style="font-size: 9.0pt; color: #5e5e5e;"&gt;| &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Verdana','sans-serif'; color: #5e5e5e;"&gt;Product Engineer | ArcGIS JavaScript API&lt;/SPAN&gt;&lt;/P&gt;&amp;nbsp; &lt;SPAN style="font-size: 9.0pt; font-family: 'Verdana','sans-serif'; color: #5e5e5e;"&gt;ESRI | 380 New York Street, Redlands, CA 92373&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;On the list for a fix.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 28 May 2015 13:43:53 GMT</pubDate>
    <dc:creator>JeffMitzelfelt</dc:creator>
    <dc:date>2015-05-28T13:43:53Z</dc:date>
    <item>
      <title>autoSelect on Search dijit not working</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/autoselect-on-search-dijit-not-working/m-p/219503#M20355</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't appear to be able to get the autoSelect on the Search to work as I expect it should work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I expect that as I enter an address and as the suggestion list is filled the top suggestion will be selected and used for the search when I press the enter key.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://jsbin.com/ronaho/10/edit?js,output" rel="nofollow noopener noreferrer" target="_blank"&gt;Here is a jsbin with a map that will pull suggested addresses from Illinois.&lt;/A&gt;​ &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is the code that defines the parameters of the Search dijit.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;nbsp; var search = new Search({
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; autoNavigate: true,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; autoSelect: true,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; enableHighlight: true,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; enableInfoWindow: false,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; map: map,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; enableButtonMode: true,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; expanded: false,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; minCharacters: 3
&amp;nbsp;&amp;nbsp;&amp;nbsp; },
&amp;nbsp;&amp;nbsp;&amp;nbsp; "searchDiv"
&amp;nbsp; );&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I type in an address like "1021 N Grand Ave E, Sp" the top suggestion is "1021 N Grand Ave E, Springfield, Illinois, USA" but when I hit Enter I get a response box with 'No results - There were no results found for "1021 N Grand Ave E, Sp".'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any Insights?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Jeff Mitzelfelt
OOPS Updated Link&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 10:42:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/autoselect-on-search-dijit-not-working/m-p/219503#M20355</guid>
      <dc:creator>JeffMitzelfelt</dc:creator>
      <dc:date>2021-12-11T10:42:50Z</dc:date>
    </item>
    <item>
      <title>Re: autoSelect on Search dijit not working</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/autoselect-on-search-dijit-not-working/m-p/219504#M20356</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am able to reproduce what you are describing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, if you either click on the suggestion in the list, or push the down arrow to select the suggestion and then press Enter, it will take you to the correct location.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Someone at Esri would need to tell you if this is a bug or not.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 May 2015 00:30:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/autoselect-on-search-dijit-not-working/m-p/219504#M20356</guid>
      <dc:creator>JeffJacobson</dc:creator>
      <dc:date>2015-05-20T00:30:52Z</dc:date>
    </item>
    <item>
      <title>Re: autoSelect on Search dijit not working</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/autoselect-on-search-dijit-not-working/m-p/219505#M20357</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It appears that the autoSelect works fine without setting the extent on the search widget. Thanks goes to Kristian Ekenes of Esri for the answer.&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.5pt; color: black;"&gt;Hi Jeff,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.5pt; color: black;"&gt;Thanks for sending us the feedback. I can reproduce this using your sample. It looks like the World Geocoding Service will get a response from suggestLocations, but not the “search” when you have an extent set on the source: &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;OL style="list-style-type: lower-alpha;"&gt;&lt;LI&gt;&lt;SPAN style="color: black; font-size: 10.5pt;"&gt;&lt;EM&gt;search.sources[0].searchExtent = searchExtent;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;/P&gt;.......&lt;BR /&gt;&lt;BR /&gt;&lt;P&gt;&lt;SPAN style="color: black; font-size: 9.0pt; font-family: 'Verdana','sans-serif';"&gt;&lt;STRONG&gt;Kristian Ekenes&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN style="font-size: 9.0pt; color: #5e5e5e;"&gt;| &lt;/SPAN&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Verdana','sans-serif'; color: #5e5e5e;"&gt;Product Engineer | ArcGIS JavaScript API&lt;/SPAN&gt;&lt;/P&gt;&amp;nbsp; &lt;SPAN style="font-size: 9.0pt; font-family: 'Verdana','sans-serif'; color: #5e5e5e;"&gt;ESRI | 380 New York Street, Redlands, CA 92373&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;On the list for a fix.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 May 2015 13:43:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/autoselect-on-search-dijit-not-working/m-p/219505#M20357</guid>
      <dc:creator>JeffMitzelfelt</dc:creator>
      <dc:date>2015-05-28T13:43:53Z</dc:date>
    </item>
    <item>
      <title>Re: autoSelect on Search dijit not working</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/autoselect-on-search-dijit-not-working/m-p/219506#M20358</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Great to hear the issue is being tracked as I just stumbled on the Extent issue in my test app. Wondering if &lt;A href="https://community.esri.com/migrated-users/105703"&gt;Kristian Ekenes&lt;/A&gt;​ might be able to provide a BUG or NIM # so we can track?&lt;/P&gt;&lt;P&gt;Many thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Jun 2015 01:56:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/autoselect-on-search-dijit-not-working/m-p/219506#M20358</guid>
      <dc:creator>BryanMc</dc:creator>
      <dc:date>2015-06-29T01:56:43Z</dc:date>
    </item>
    <item>
      <title>Re: autoSelect on Search dijit not working</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/autoselect-on-search-dijit-not-working/m-p/219507#M20359</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Unfortunately, I'm not able to provide a BUG or NIM# for tracking. Whoever submits the issue to support should be able to provide that number.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After looking into this issue further, it's worth noting that the suggest function behaves differently than the actual "search" or "findAddressCandidates" function. Typing &lt;SPAN style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;"1021 N Grand Ave E, Sp" into the search bar automatically inputs that text to the suggest() function. When you hit ENTER or the search button, it sends that same exact text to the findAddressCandidates() function. Both suggest() and findAddressCandidates() have different logic and therefore yield different results. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;The reason, no results are returned in the above example is because the top result from findAddressCandidates() is located outside the searchExtent even though the top result from suggest() IS located inside the search extent. I know...it's weird behavior, but that's what's going on behind the scenes. So when autoSelect is set to true, it's not selecting the first suggestion, it's selecting the first result returned from the geocode. The documentation can be updated to make that more clear.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;To make sure the text from a suggestion is used for the findAddressCandidates() function, you must click on the text for it to search the suggestion properly. I hope this explanation helps.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Jul 2015 22:54:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/autoselect-on-search-dijit-not-working/m-p/219507#M20359</guid>
      <dc:creator>KristianEkenes</dc:creator>
      <dc:date>2015-07-06T22:54:21Z</dc:date>
    </item>
    <item>
      <title>Re: autoSelect on Search dijit not working</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/autoselect-on-search-dijit-not-working/m-p/219508#M20360</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jeff,&lt;/P&gt;&lt;P&gt;I agree with Kristian.&lt;/P&gt;&lt;P&gt;Also, If we look at AutoSelect function specifically, I don't think we can log a bug against that because this function is dependent on FindAddressCandidate task's results and on correct results this works completely fine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The suggestions given in the box below are result of the Suggest task and actual address is returned by the FindAddressCandidates. If you are writing a specific address and you hit ENTER button you are not selecting the suggestion, instead, It will always give a priority to the text that you have typed in the box (Even if it is spelled incorrect) over what is the first suggestion and send that to the FindAddressCandidate. So, I might not see this as bug, It will probably just by design. &lt;A href="https://community.esri.com/migrated-users/105703"&gt;Kristian Ekenes&lt;/A&gt;​ can you provide some insight on that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, if you type the address that you have given(&lt;SPAN style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt; "1021 N Grand Ave E, Sp")&lt;/SPAN&gt; in GOOGLE Maps&amp;nbsp; and hit ENTER button it will not select the first suggestion and will behave identically returning no results.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want it to customize and add a behavior like that I would recommend checking out &lt;A href="https://developers.arcgis.com/javascript/jsapi/search-amd.html#event-suggest-results"&gt;Suggest-Results&lt;/A&gt; event. You may be able to get the first value and complete the search box on "TAB" Button click leaving the enter button to function as it is.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let me know your thoughts.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Akshay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Jul 2015 21:03:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/autoselect-on-search-dijit-not-working/m-p/219508#M20360</guid>
      <dc:creator>AkshayHarshe</dc:creator>
      <dc:date>2015-07-07T21:03:07Z</dc:date>
    </item>
    <item>
      <title>Re: autoSelect on Search dijit not working</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/autoselect-on-search-dijit-not-working/m-p/219509#M20361</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, Akshay. In addition to understanding the differences between suggest() and findAddressCandidates(), I think the documentation currently doesn't do a good job at conveying the purpose of &lt;EM&gt;autoSelect&lt;/EM&gt;. This will be updated so that it makes more sense. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The purpose of &lt;EM&gt;autoSelect&lt;/EM&gt; &lt;STRONG&gt;isn't&lt;/STRONG&gt; to select the first &lt;STRONG&gt;suggestion&lt;/STRONG&gt;, geocode it, and zoom to it. Rather, it is to geocode and zoom to the first result returned from entering the text exactly as it appears in the search box. This text is sent directly to &lt;STRONG&gt;findAddressCandidates() &lt;/STRONG&gt;and doesn't necessarily return the same result as the top suggestion since both are sent to different endpoints. The suggestions listed below the text box as you type are merely that - suggestions. Those results will not be used to geocode unless you click on one of them or select it using your keyboard. Merely hitting enter will only take what is already inside the text box.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;autoSelect&lt;/EM&gt; is set to true by default. If you set it to false, you will notice that the findAddressCandidates() function is called, but the top geocoded result is not selected or zoomed to. It is up to the developer to use the results however they want. The results can be accessed using the &lt;STRONG&gt;search-results&lt;/STRONG&gt; event: &lt;A href="https://developers.arcgis.com/javascript/jsapi/search-amd.html#event-search-results" title="https://developers.arcgis.com/javascript/jsapi/search-amd.html#event-search-results"&gt;Search | API Reference | ArcGIS API for JavaScript&lt;/A&gt; . &lt;EM&gt;autoSelect&lt;/EM&gt; is true by default because in most cases the top result is what the user wants to zoom to.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Jul 2015 21:54:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/autoselect-on-search-dijit-not-working/m-p/219509#M20361</guid>
      <dc:creator>KristianEkenes</dc:creator>
      <dc:date>2015-07-07T21:54:28Z</dc:date>
    </item>
    <item>
      <title>Re: autoSelect on Search dijit not working</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/autoselect-on-search-dijit-not-working/m-p/219510#M20362</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I agree with your opinion &lt;A href="https://community.esri.com/migrated-users/105703"&gt;Kristian Ekenes&lt;/A&gt;. Also, &lt;SPAN style="line-height: 1.5;"&gt;documentation is not very clear on explaining details about autoSelect. &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Jul 2015 22:32:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/autoselect-on-search-dijit-not-working/m-p/219510#M20362</guid>
      <dc:creator>AkshayHarshe</dc:creator>
      <dc:date>2015-07-07T22:32:09Z</dc:date>
    </item>
  </channel>
</rss>

