<?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: add a new selection as the upper layer in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/add-a-new-selection-as-the-upper-layer/m-p/474837#M44064</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think you could manually move the layer around so that it's the last layer. &amp;nbsp;Another option would be to set the opacity of all other layers to something like .5 so you can ensure that you can see through them at least.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's how you might approach the first option:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; map&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; myFeatureLayer&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; query&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;

myFeatureLayer&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;selectFeatures&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;query&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; FeatureLayer&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;SELECTION_NEW&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;function&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;event&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
&amp;nbsp; &lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;event&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;features&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;length&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; map&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;reorderLayer&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;myFeatureLayer&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; map&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;layerIds&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;length &lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;1&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp; &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When the features are deselected you may want to change the order of this layer back to where it was previously.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Dec 2021 20:59:40 GMT</pubDate>
    <dc:creator>ThomasSolow</dc:creator>
    <dc:date>2021-12-11T20:59:40Z</dc:date>
    <item>
      <title>add a new selection as the upper layer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/add-a-new-selection-as-the-upper-layer/m-p/474836#M44063</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;When I create a new selection in a layer, I notice that that selection can be covered by other layers if my layer wasn't the upper one, I wanna make that layer the upper one when an element of it is selected, How can that be achieved ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;DIV style="color: #d4d4d4; background-color: #1e1e1e; font-size: 14px;"&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #d4d4d4;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #9cdcfe;"&gt;myFeatureLayer&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #dcdcaa;"&gt;selectFeatures&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #9cdcfe;"&gt;query&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #9cdcfe;"&gt;FeatureLayer&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: #9cdcfe;"&gt;SELECTION_NEW&lt;/SPAN&gt;&lt;SPAN style="color: #d4d4d4;"&gt;);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&lt;A href="https://community.esri.com/migrated-users/3101"&gt;Robert Scheitlin, GISP&lt;/A&gt;‌&amp;nbsp;&lt;A href="https://community.esri.com/migrated-users/2691"&gt;Rebecca Strauch, GISP&lt;/A&gt;&amp;nbsp;&lt;A href="https://community.esri.com/people/TSolow-esristaff"&gt;TSolow-esristaff&lt;/A&gt;‌&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Jun 2017 02:33:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/add-a-new-selection-as-the-upper-layer/m-p/474836#M44063</guid>
      <dc:creator>SaraEL_MALKI</dc:creator>
      <dc:date>2017-06-28T02:33:02Z</dc:date>
    </item>
    <item>
      <title>Re: add a new selection as the upper layer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/add-a-new-selection-as-the-upper-layer/m-p/474837#M44064</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think you could manually move the layer around so that it's the last layer. &amp;nbsp;Another option would be to set the opacity of all other layers to something like .5 so you can ensure that you can see through them at least.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's how you might approach the first option:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; map&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; myFeatureLayer&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; query&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;

myFeatureLayer&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;selectFeatures&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;query&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; FeatureLayer&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;SELECTION_NEW&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;function&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;event&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
&amp;nbsp; &lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;event&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;features&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;length&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; map&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;reorderLayer&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;myFeatureLayer&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; map&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;layerIds&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;length &lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;1&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp; &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When the features are deselected you may want to change the order of this layer back to where it was previously.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 20:59:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/add-a-new-selection-as-the-upper-layer/m-p/474837#M44064</guid>
      <dc:creator>ThomasSolow</dc:creator>
      <dc:date>2021-12-11T20:59:40Z</dc:date>
    </item>
  </channel>
</rss>

