<?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 Update definitionExpression from angular application after layer is added to the map not working properly. in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/update-definitionexpression-from-angular/m-p/1216762#M78842</link>
    <description>&lt;P&gt;I have an angular application that uses JS API 4.23.&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I load the map, I load some layers as not visible. When I toggle a button to display a layer, I apply a definition expression and instead the layer shows all features. If I change the definitionExpression or zoom in/out (not pan) the layerDefinition updates to its correct value.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm using&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;featLayer&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;definitionExpression&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;layerDefinition&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&lt;SPAN&gt;I now have added&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;featLayer&lt;/SPAN&gt;&lt;SPAN&gt;.refresh() after updating the definitionExpression. After adding the refresh, the first time I set the definition expression, all features show up. The second time, it flashes all features and then updates itself and works fine moving forward (for that specific layer, not others)&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&lt;SPAN&gt;I also tried setting&amp;nbsp;"featurelayer-snapshot-enabled": 0 as shown here: &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&lt;A href="https://codepen.io/U_B_U/pen/dyVLKaG?editors=1000" target="_blank" rel="noopener"&gt;https://codepen.io/U_B_U/pen/dyVLKaG?editors=1000&lt;/A&gt; without any fixes&lt;/SPAN&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;esriConfig&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;workers&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;loaderConfig&lt;/SPAN&gt;&lt;SPAN&gt;!.&lt;/SPAN&gt;&lt;SPAN&gt;has&lt;/SPAN&gt;&lt;SPAN&gt; = {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;"featurelayer-snapshot-enabled"&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt; &lt;SPAN&gt;0&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;}&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Is this a bug?&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;The layers that I load with a definition expression&amp;nbsp;and visible, from the beginning work just fine.&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;I need to resolve this ASAP. Thanks!&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
    <pubDate>Tue, 27 Sep 2022 22:00:11 GMT</pubDate>
    <dc:creator>JulianaCastillo</dc:creator>
    <dc:date>2022-09-27T22:00:11Z</dc:date>
    <item>
      <title>Update definitionExpression from angular application after layer is added to the map not working properly.</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/update-definitionexpression-from-angular/m-p/1216762#M78842</link>
      <description>&lt;P&gt;I have an angular application that uses JS API 4.23.&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I load the map, I load some layers as not visible. When I toggle a button to display a layer, I apply a definition expression and instead the layer shows all features. If I change the definitionExpression or zoom in/out (not pan) the layerDefinition updates to its correct value.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm using&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;featLayer&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;definitionExpression&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;layerDefinition&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&lt;SPAN&gt;I now have added&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;featLayer&lt;/SPAN&gt;&lt;SPAN&gt;.refresh() after updating the definitionExpression. After adding the refresh, the first time I set the definition expression, all features show up. The second time, it flashes all features and then updates itself and works fine moving forward (for that specific layer, not others)&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&lt;SPAN&gt;I also tried setting&amp;nbsp;"featurelayer-snapshot-enabled": 0 as shown here: &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&lt;A href="https://codepen.io/U_B_U/pen/dyVLKaG?editors=1000" target="_blank" rel="noopener"&gt;https://codepen.io/U_B_U/pen/dyVLKaG?editors=1000&lt;/A&gt; without any fixes&lt;/SPAN&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;esriConfig&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;workers&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;loaderConfig&lt;/SPAN&gt;&lt;SPAN&gt;!.&lt;/SPAN&gt;&lt;SPAN&gt;has&lt;/SPAN&gt;&lt;SPAN&gt; = {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;"featurelayer-snapshot-enabled"&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt; &lt;SPAN&gt;0&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;}&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Is this a bug?&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;The layers that I load with a definition expression&amp;nbsp;and visible, from the beginning work just fine.&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;I need to resolve this ASAP. Thanks!&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 27 Sep 2022 22:00:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/update-definitionexpression-from-angular/m-p/1216762#M78842</guid>
      <dc:creator>JulianaCastillo</dc:creator>
      <dc:date>2022-09-27T22:00:11Z</dc:date>
    </item>
  </channel>
</rss>

