<?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: Highlight a selected feature from search result list. in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/highlight-a-selected-feature-from-search-result/m-p/164513#M15283</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I might be mistaken but it still seems to have the issue of not clearing results between searches.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 27 Oct 2015 20:14:39 GMT</pubDate>
    <dc:creator>AliciaPaulus</dc:creator>
    <dc:date>2015-10-27T20:14:39Z</dc:date>
    <item>
      <title>Highlight a selected feature from search result list.</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/highlight-a-selected-feature-from-search-result/m-p/164507#M15277</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Let me preface this question with some facts. First, I am a third grader when it comes to coding; I gave a basic understanding at best. Second, the code I'm working on is adapted from code we were given permission to use. Now, on to my question.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to get my code to highlight the in map feature when I select the feature from my search results. Right now my code symbolizes my search results but when I select a name from my list, the map centers on that selected feature but the symbol remains the same. So, if you have a number of search results in the same area, there is no way to tell for certainty which individual you selected from the list without identifying each possibility. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can't even identify where in the code I should be looking to edit. I've tried a few things but it doesn't make any change in map. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is a working copy of our code.&lt;/P&gt;&lt;P&gt;&lt;A href="http://gis.adamscounty.us/vet/Testing.html" title="http://gis.adamscounty.us/vet/Testing.html"&gt;Adams County Veteran Cemetery Project&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help will be appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Alicia&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Oct 2015 16:28:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/highlight-a-selected-feature-from-search-result/m-p/164507#M15277</guid>
      <dc:creator>AliciaPaulus</dc:creator>
      <dc:date>2015-10-27T16:28:14Z</dc:date>
    </item>
    <item>
      <title>Re: Highlight a selected feature from search result list.</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/highlight-a-selected-feature-from-search-result/m-p/164508#M15278</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Alicia,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've attached an update to the code that should accomplish what you're looking for.&amp;nbsp; Map class graphics will always draw on top, so I added a couple of &lt;A href="https://developers.arcgis.com/javascript/jsapi/graphicslayer-amd.html"&gt;GraphicLayers &lt;/A&gt;to the application so that you can control the drawing order.&amp;nbsp; The query results of the FindTask will be stored in one GraphicsLayer.&amp;nbsp; When a row is clicked, a graphic will be added to the other GraphicsLayer with a different color so you can easily see which feature is selected.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Oct 2015 19:17:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/highlight-a-selected-feature-from-search-result/m-p/164508#M15278</guid>
      <dc:creator>JakeSkinner</dc:creator>
      <dc:date>2015-10-27T19:17:23Z</dc:date>
    </item>
    <item>
      <title>Re: Highlight a selected feature from search result list.</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/highlight-a-selected-feature-from-search-result/m-p/164509#M15279</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Alicia,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Just to add to what Jake has done you will want to remove all the Legacy coding you have in your app as well. You have all your needed requires and vars in place for your code to be pure AMD but you still use Legacy lines like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="javascript" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14459738258076271 jive_text_macro" data-renderedposition="113_8_912_16" jivemacro_uid="_14459738258076271"&gt;&lt;P&gt;map = new esri.Map("map", {&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;Every where you have esri dot you need to drop that format and switch to the AMD var you have already established. So for the map it would be:&lt;/P&gt;&lt;PRE __default_attr="javascript" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_14459739131279832" data-renderedposition="150_8_912_16" jivemacro_uid="_14459739131279832"&gt;&lt;P&gt;map = new Map("map", {&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="javascript" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_1445973934193269 jive_text_macro" data-renderedposition="187_8_912_16" jivemacro_uid="_1445973934193269"&gt;&lt;P&gt;var Layer4 = new esri.layers.ArcGISDynamicMapServiceLayer(&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;should be:&lt;/P&gt;&lt;PRE __default_attr="javascript" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14459739531934967 jive_text_macro" data-renderedposition="224_8_912_16" jivemacro_uid="_14459739531934967"&gt;&lt;P&gt;var Layer4 = new ArcGISDynamicMapServiceLayer(&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the 4.0 version of the API legacy code like this will not be supported.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Oct 2015 19:26:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/highlight-a-selected-feature-from-search-result/m-p/164509#M15279</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2015-10-27T19:26:33Z</dc:date>
    </item>
    <item>
      <title>Re: Highlight a selected feature from search result list.</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/highlight-a-selected-feature-from-search-result/m-p/164510#M15280</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Perfect that's exactly what I was trying to accomplish. Thank you so much for all your help!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Only one issue that I found with the updated code. When doing a search the selected map features; the blue ones, aren't getting cleared. They are just compounding, so when you preform a new search, it has all the previous search results displayed as well.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Oct 2015 19:46:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/highlight-a-selected-feature-from-search-result/m-p/164510#M15280</guid>
      <dc:creator>AliciaPaulus</dc:creator>
      <dc:date>2015-10-27T19:46:13Z</dc:date>
    </item>
    <item>
      <title>Re: Highlight a selected feature from search result list.</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/highlight-a-selected-feature-from-search-result/m-p/164511#M15281</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You're right, I missed this.&amp;nbsp; To fix this you will just need to update the first line under '&lt;STRONG&gt;function showResults(results){&lt;/STRONG&gt;'.&amp;nbsp; Change '&lt;STRONG&gt;map.graphics.clear()&lt;/STRONG&gt;' to:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;queryLayer.clear();&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Oct 2015 19:57:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/highlight-a-selected-feature-from-search-result/m-p/164511#M15281</guid>
      <dc:creator>JakeSkinner</dc:creator>
      <dc:date>2015-10-27T19:57:19Z</dc:date>
    </item>
    <item>
      <title>Re: Highlight a selected feature from search result list.</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/highlight-a-selected-feature-from-search-result/m-p/164512#M15282</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Another suggestion on modernizing your code would be to remove the "dojo.connect" &lt;A href="https://developers.arcgis.com/javascript/jshelp/inside_events.html"&gt;event handling wiring&lt;/A&gt; and replace that with "on". You are already using this in your code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="javascript" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14459764285735230 jive_text_macro" data-renderedposition="71_8_912_16" jivemacro_uid="_14459764285735230" modifiedtitle="true"&gt;&lt;P&gt;map.on("load", function() {&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but you still have the legacy style elsewhere&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="javascript" __jive_macro_name="code" class="_jivemacro_uid_14459764640597082 jive_macro_code jive_text_macro" data-renderedposition="150_8_912_16" jivemacro_uid="_14459764640597082" modifiedtitle="true"&gt;&lt;P&gt;dojo.connect(map, "onLayersAddResult", function(results) {&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This style of event wiring will be removed when Dojo 2.0 comes out.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Oct 2015 20:09:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/highlight-a-selected-feature-from-search-result/m-p/164512#M15282</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2015-10-27T20:09:28Z</dc:date>
    </item>
    <item>
      <title>Re: Highlight a selected feature from search result list.</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/highlight-a-selected-feature-from-search-result/m-p/164513#M15283</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I might be mistaken but it still seems to have the issue of not clearing results between searches.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Oct 2015 20:14:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/highlight-a-selected-feature-from-search-result/m-p/164513#M15283</guid>
      <dc:creator>AliciaPaulus</dc:creator>
      <dc:date>2015-10-27T20:14:39Z</dc:date>
    </item>
    <item>
      <title>Re: Highlight a selected feature from search result list.</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/highlight-a-selected-feature-from-search-result/m-p/164514#M15284</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for the tip. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As soon as I can get this code to do everything that I want it to, adding notes and syntax clean up is will be my new #1 priority. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Oct 2015 20:20:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/highlight-a-selected-feature-from-search-result/m-p/164514#M15284</guid>
      <dc:creator>AliciaPaulus</dc:creator>
      <dc:date>2015-10-27T20:20:29Z</dc:date>
    </item>
    <item>
      <title>Re: Highlight a selected feature from search result list.</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/highlight-a-selected-feature-from-search-result/m-p/164515#M15285</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try clearing your browser cache after making the update.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Oct 2015 20:21:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/highlight-a-selected-feature-from-search-result/m-p/164515#M15285</guid>
      <dc:creator>JakeSkinner</dc:creator>
      <dc:date>2015-10-27T20:21:16Z</dc:date>
    </item>
    <item>
      <title>Re: Highlight a selected feature from search result list.</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/highlight-a-selected-feature-from-search-result/m-p/164516#M15286</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hooray!! It works!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you so much for all your help. This project has really been a journey. I really can't express how thankful and appreciative I am for your help. This highlighting issue really was the last obstacle we had to solve before we presented this project next week. You saved me hours of work, headaches, and having to use my colorful vocabulary due to frustration. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you again.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Oct 2015 20:34:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/highlight-a-selected-feature-from-search-result/m-p/164516#M15286</guid>
      <dc:creator>AliciaPaulus</dc:creator>
      <dc:date>2015-10-27T20:34:15Z</dc:date>
    </item>
  </channel>
</rss>

