<?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: Select top feature layer in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/select-top-feature-layer/m-p/1349701#M82768</link>
    <description>&lt;P&gt;Hi Ken&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for the quick response. How do I then get that popup to appear if I click directly on that layer, i.e. I want to log a new pothole issue?&lt;/P&gt;&lt;P&gt;I need the popup for the points (existing pothole issues) to appear if I click directly on them, but the popup for the street layer (log a new pothole) to appear if I click anywhere else (on the line layer).&lt;/P&gt;&lt;P&gt;I'd seen something about graphics drawing order on another post but not sure if that is the issue or how to implement it.&lt;/P&gt;</description>
    <pubDate>Wed, 15 Nov 2023 15:27:13 GMT</pubDate>
    <dc:creator>ITApplications</dc:creator>
    <dc:date>2023-11-15T15:27:13Z</dc:date>
    <item>
      <title>Select top feature layer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/select-top-feature-layer/m-p/1349688#M82766</link>
      <description>&lt;DIV class=""&gt;Hi all, I think this should be a simple query.&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;I have a map which has two feature layers, a points layer and a line layer.&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;I have ordered the layers so that the points layer sits above the line layer, see example below.&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image1.png" style="width: 949px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/86052iD9CD9FB363EC0421/image-size/large?v=v2&amp;amp;px=999" role="button" title="image1.png" alt="image1.png" /&gt;&lt;/span&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;SPAN&gt;My query/issue is, is that when I try to click on a point, it always selects the line layer first (despite graphically it being on top). I then have to cycle through the popup results for it to select the point and display its popup.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;As you can see in the image below, it's selected my line layer despite me clicking on the point.&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="It displays the line layer popup first" style="width: 943px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/86054i1D4C345C8988BFD5/image-size/large?v=v2&amp;amp;px=999" role="button" title="image2.png" alt="It displays the line layer popup first" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;It displays the line layer popup first&lt;/span&gt;&lt;/span&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;I then have to cycle the popup for it to select and show the point&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image3.png" style="width: 507px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/86056iB8B91438AAF06D56/image-size/large?v=v2&amp;amp;px=999" role="button" title="image3.png" alt="image3.png" /&gt;&lt;/span&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;DIV&gt;I've tried rearranging the layers and have poured through the ESRI pages but I can't find anything that answers my query.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;In these cases, if you click on the point, I would like it to either just select that point (and not the layer below it) or at least display the point popup first.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Hoping this is a simple solution.&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 16 Nov 2023 14:32:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/select-top-feature-layer/m-p/1349688#M82766</guid>
      <dc:creator>ITApplications</dc:creator>
      <dc:date>2023-11-16T14:32:10Z</dc:date>
    </item>
    <item>
      <title>Re: Select top feature layer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/select-top-feature-layer/m-p/1349695#M82767</link>
      <description>&lt;P&gt;You can set the &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#popupEnabled" target="_self"&gt;popupEnabled&lt;/A&gt; property to false for any layer you don't want the popup to appear.&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;     const streetLayer = new FeatureLayer({
        url: "https://services6.arcgis.com/Qptn479QktK11k72/arcgis/rest/services/Stsearch/FeatureServer",
        definitionExpression: ("Customer_N in ('HW: ERYC Highway Maintained','HW: ERYC Part Maintained')"),
        outFields: ["*"],
        title: "East Riding maintained road",
        renderer: stsRend,
        popupEnabled: false
     });&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 15 Nov 2023 15:18:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/select-top-feature-layer/m-p/1349695#M82767</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2023-11-15T15:18:35Z</dc:date>
    </item>
    <item>
      <title>Re: Select top feature layer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/select-top-feature-layer/m-p/1349701#M82768</link>
      <description>&lt;P&gt;Hi Ken&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for the quick response. How do I then get that popup to appear if I click directly on that layer, i.e. I want to log a new pothole issue?&lt;/P&gt;&lt;P&gt;I need the popup for the points (existing pothole issues) to appear if I click directly on them, but the popup for the street layer (log a new pothole) to appear if I click anywhere else (on the line layer).&lt;/P&gt;&lt;P&gt;I'd seen something about graphics drawing order on another post but not sure if that is the issue or how to implement it.&lt;/P&gt;</description>
      <pubDate>Wed, 15 Nov 2023 15:27:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/select-top-feature-layer/m-p/1349701#M82768</guid>
      <dc:creator>ITApplications</dc:creator>
      <dc:date>2023-11-15T15:27:13Z</dc:date>
    </item>
    <item>
      <title>Re: Select top feature layer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/select-top-feature-layer/m-p/1349706#M82769</link>
      <description>&lt;P&gt;Could you use the same logic used in this &lt;A href="https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/if-else-popups/m-p/1236398" target="_self"&gt;post&lt;/A&gt;?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Nov 2023 15:33:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/select-top-feature-layer/m-p/1349706#M82769</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2023-11-15T15:33:48Z</dc:date>
    </item>
    <item>
      <title>Re: Select top feature layer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/select-top-feature-layer/m-p/1350019#M82780</link>
      <description>&lt;P&gt;The order of features displayed in the popup has produced no small amount of lively discussion.&amp;nbsp; The popup does not show features in layer order, but rather in order of how quickly results are retrieved from the layers.&amp;nbsp; Pretty much everything you'd ever want to know about it is in &lt;A href="https://community.esri.com/t5/arcgis-online-questions/how-can-i-change-the-order-of-popups-on-an-arcgis-online-map/m-p/660210" target="_self"&gt;this thread&lt;/A&gt;, which although started back in 2014 continues to the present day.&amp;nbsp; Despite the discussion being in a different context (ArcGIS Online), it's the very same issue.&lt;/P&gt;</description>
      <pubDate>Wed, 15 Nov 2023 22:41:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/select-top-feature-layer/m-p/1350019#M82780</guid>
      <dc:creator>JoelBennett</dc:creator>
      <dc:date>2023-11-15T22:41:06Z</dc:date>
    </item>
    <item>
      <title>Re: Select top feature layer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/select-top-feature-layer/m-p/1350231#M82790</link>
      <description>&lt;P&gt;Hi Joel&lt;/P&gt;&lt;P&gt;Wow, this is my exact query and yes agreed what a lively discussion! Seems sadly there is no sort order other than the fastest to load first wins. I did notice on my popups that before I added the url's to the point features they were loading first (before the line feature popup) and that was exactly what I wanted,&lt;BR /&gt;&lt;BR /&gt;Sounds like no way to set the order (yet) so looks like my only option at the moment is to strip down my point feature popups to get them to win the race and load faster.&lt;BR /&gt;&lt;BR /&gt;Thanks for your pointer on this.&lt;/P&gt;</description>
      <pubDate>Thu, 16 Nov 2023 14:33:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/select-top-feature-layer/m-p/1350231#M82790</guid>
      <dc:creator>ITApplications</dc:creator>
      <dc:date>2023-11-16T14:33:13Z</dc:date>
    </item>
    <item>
      <title>Re: Select top feature layer</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/select-top-feature-layer/m-p/1363372#M83179</link>
      <description>&lt;P&gt;Looks like&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/400217"&gt;@LaurenBoyd&lt;/a&gt;&amp;nbsp;has a Christmas present that's going to make a lot of people happy this year.&amp;nbsp; According to &lt;A href="https://github.com/Esri/feedback-js-api-next/blob/main/CHANGELOG.md" target="_self"&gt;this page&lt;/A&gt;, the popup will display features in layer order starting in 4.29 (expected release in February 2024).&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;"The&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html" rel="nofollow" target="_blank"&gt;Popup&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;and&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Features.html" rel="nofollow" target="_blank"&gt;Features&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;widgets now display features from multiple layers in the order they are displayed in the map. This means that the features of the topmost layer in the map will appear first, followed by the features of the next layer, and so on. In previous versions, the features were displayed in the order they were returned from the server."&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Dec 2023 23:34:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/select-top-feature-layer/m-p/1363372#M83179</guid>
      <dc:creator>JoelBennett</dc:creator>
      <dc:date>2023-12-20T23:34:59Z</dc:date>
    </item>
  </channel>
</rss>

