<?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 visible features in featureLayerView in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/visible-features-in-featurelayerview/m-p/1233008#M79378</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I have created a featureLayerView from a polygon featureLayer (think census tracts) and I allow the user to set various attribute based filters.&lt;/P&gt;&lt;P&gt;I would now like to get the number of features currently shown on the screen (which seems like it would be a very straight forward thing to do).&lt;/P&gt;&lt;P&gt;To do this I apply a spatial query to the featureLayerView using the extent from the mapView for query geometry.&amp;nbsp;&lt;/P&gt;&lt;P&gt;The problem is I sometimes get&amp;nbsp; the correct answer and sometimes don't (the worst kind of problem).&amp;nbsp; Looking at the features that are returned, sometimes features&amp;nbsp; are well out of current view (e.g. closest point on the polygon is probably a few miles outside of the relatively zoomed in view).&amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;All data, as well as the mapview are in web Mercator.&lt;/P&gt;&lt;P&gt;Any thoughts would be greatly appreciated,&lt;/P&gt;&lt;P&gt;Thanks, Gary&lt;/P&gt;</description>
    <pubDate>Thu, 17 Nov 2022 22:36:48 GMT</pubDate>
    <dc:creator>GaryB</dc:creator>
    <dc:date>2022-11-17T22:36:48Z</dc:date>
    <item>
      <title>visible features in featureLayerView</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/visible-features-in-featurelayerview/m-p/1233008#M79378</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I have created a featureLayerView from a polygon featureLayer (think census tracts) and I allow the user to set various attribute based filters.&lt;/P&gt;&lt;P&gt;I would now like to get the number of features currently shown on the screen (which seems like it would be a very straight forward thing to do).&lt;/P&gt;&lt;P&gt;To do this I apply a spatial query to the featureLayerView using the extent from the mapView for query geometry.&amp;nbsp;&lt;/P&gt;&lt;P&gt;The problem is I sometimes get&amp;nbsp; the correct answer and sometimes don't (the worst kind of problem).&amp;nbsp; Looking at the features that are returned, sometimes features&amp;nbsp; are well out of current view (e.g. closest point on the polygon is probably a few miles outside of the relatively zoomed in view).&amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;All data, as well as the mapview are in web Mercator.&lt;/P&gt;&lt;P&gt;Any thoughts would be greatly appreciated,&lt;/P&gt;&lt;P&gt;Thanks, Gary&lt;/P&gt;</description>
      <pubDate>Thu, 17 Nov 2022 22:36:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/visible-features-in-featurelayerview/m-p/1233008#M79378</guid>
      <dc:creator>GaryB</dc:creator>
      <dc:date>2022-11-17T22:36:48Z</dc:date>
    </item>
    <item>
      <title>Re: visible features in featureLayerView</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/visible-features-in-featurelayerview/m-p/1233048#M79380</link>
      <description>&lt;P&gt;Are you checking for the view or layerView updating property to be false before you query?&lt;/P&gt;&lt;P&gt;Here is a sample watching for the extent to change and waiting for the view to stop updating.&lt;/P&gt;&lt;P&gt;&lt;A href="https://codepen.io/odoe/pen/mdKqVdM?editors=0010" target="_blank"&gt;https://codepen.io/odoe/pen/mdKqVdM?editors=0010&lt;/A&gt;&lt;/P&gt;&lt;P&gt;It uses a debounce, but for client-side data, might not need it.&lt;/P&gt;&lt;P&gt;If this isn't the issue you're seeing, if you have a repro to look at, could get a better idea of the issue.&lt;/P&gt;</description>
      <pubDate>Thu, 17 Nov 2022 23:52:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/visible-features-in-featurelayerview/m-p/1233048#M79380</guid>
      <dc:creator>ReneRubalcava</dc:creator>
      <dc:date>2022-11-17T23:52:51Z</dc:date>
    </item>
  </channel>
</rss>

