<?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: v4.7 - How to redraw/refresh FeatureLayer in MapView after applyEdits? (SceneView works fine) in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/v4-7-how-to-redraw-refresh-featurelayer-in-mapview/m-p/485513#M45202</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the answer, Rene.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That did the trick.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I did also notice that setting the "visible" property of a graphic to false in a FeatureLayer (webgl set to 0) does not hide the graphic in MapView, but it does in SceneView. I have a need to temporarily hide a graphic and as a workaround,&amp;nbsp;I'm currently modifying&amp;nbsp;the definitionExpression to exclude that OBJECTID, then set it back later,&amp;nbsp;&lt;SPAN&gt;but that's kind of cumbersome with the network traffic depending on number of features.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm looking forward to more of these features coming to the MapView and the WebGL FeatureLayers in the future!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, thanks for the work on the new webpack plugin. It's made the process of integrating the API into our build so much easier!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 19 May 2018 12:54:44 GMT</pubDate>
    <dc:creator>DannyBritt1</dc:creator>
    <dc:date>2018-05-19T12:54:44Z</dc:date>
    <item>
      <title>v4.7 - How to redraw/refresh FeatureLayer in MapView after applyEdits? (SceneView works fine)</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/v4-7-how-to-redraw-refresh-featurelayer-in-mapview/m-p/485511#M45200</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Link to github showcasing this particular issue with version 4.7.2 of the API:&amp;nbsp;&lt;A class="link-titled" href="https://github.com/danbritt/arcgis-api-refresh-issue" title="https://github.com/danbritt/arcgis-api-refresh-issue"&gt;GitHub - danbritt/arcgis-api-refresh-issue&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This project uses this as a base:&amp;nbsp;&lt;A class="link-titled" href="https://github.com/Esri/jsapi-resources/tree/master/4.x/webpack/demo" title="https://github.com/Esri/jsapi-resources/tree/master/4.x/webpack/demo"&gt;jsapi-resources/4.x/webpack/demo at master · Esri/jsapi-resources · GitHub&lt;/A&gt;&amp;nbsp; and I'm using the featurelayer from this example:&amp;nbsp;&lt;A class="link-titled" href="https://developers.arcgis.com/javascript/latest/sample-code/sandbox/index.html?sample=editing-applyedits" title="https://developers.arcgis.com/javascript/latest/sample-code/sandbox/index.html?sample=editing-applyedits"&gt;ArcGIS API for JavaScript Sandbox&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When using applyEdits on a FeatureLayer that is in a SceneView, the new feature saves and shows up on the map. If you switch to a MapView, it saves the features correctly, but they do not show on the map unless you pan away and then back. (In my github, you can change the import at the top of webmapview.tsx to test this issue.)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The only way I can get the layer to refresh in a MapView is to do some weird asynchronous changing of the definitionExpression using window.setTimeout() (which hasn't been reliable), or removing and re-adding the layer to the map which causes all features to disappear for a second which isn't ideal.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried using the refresh() method of FeatureLayer but it didn't seem to do anything. I did not see any requests made in the network tab of chrome dev tools or any redrawing of the layer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is this a bug? Or is there some way to&amp;nbsp;refresh the layer in a&amp;nbsp;MapView that I am not seeing? Any help would be appreciated, and if I can show any more details let me know.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 May 2018 22:09:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/v4-7-how-to-redraw-refresh-featurelayer-in-mapview/m-p/485511#M45200</guid>
      <dc:creator>DannyBritt1</dc:creator>
      <dc:date>2018-05-16T22:09:10Z</dc:date>
    </item>
    <item>
      <title>Re: v4.7 - How to redraw/refresh FeatureLayer in MapView after applyEdits? (SceneView works fine)</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/v4-7-how-to-redraw-refresh-featurelayer-in-mapview/m-p/485512#M45201</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;By default, the webpack-plugin has WebGL for FeatureLayers enabled.&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://github.com/Esri/arcgis-webpack-plugin/blob/master/lib/loaderConfig.js#L126" title="https://github.com/Esri/arcgis-webpack-plugin/blob/master/lib/loaderConfig.js#L126" rel="nofollow noopener noreferrer" target="_blank"&gt;arcgis-webpack-plugin/loaderConfig.js at master · Esri/arcgis-webpack-plugin · GitHub&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Currently, WebGL FeatureLayer doesn't support applyEdits.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For the webpack-plugin, you can provide your own loaderConfig(), just copy the one from the repo and update your webpack config to use it.&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="comment token"&gt;// in your own loaderConfig.js&lt;/SPAN&gt;
&lt;SPAN class="comment token"&gt;// change this line&lt;/SPAN&gt;
&lt;SPAN class="string token"&gt;"esri-featurelayer-webgl"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;

&lt;SPAN class="comment token"&gt;// in your webpack.config.js&lt;/SPAN&gt;
plugins&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;new&lt;/SPAN&gt; &lt;SPAN class="token class-name"&gt;ArcGISPlugin&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; options&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; loaderConfig&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;require&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"./myCustomloaderConfig"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &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;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 21:24:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/v4-7-how-to-redraw-refresh-featurelayer-in-mapview/m-p/485512#M45201</guid>
      <dc:creator>ReneRubalcava</dc:creator>
      <dc:date>2021-12-11T21:24:08Z</dc:date>
    </item>
    <item>
      <title>Re: v4.7 - How to redraw/refresh FeatureLayer in MapView after applyEdits? (SceneView works fine)</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/v4-7-how-to-redraw-refresh-featurelayer-in-mapview/m-p/485513#M45202</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the answer, Rene.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That did the trick.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I did also notice that setting the "visible" property of a graphic to false in a FeatureLayer (webgl set to 0) does not hide the graphic in MapView, but it does in SceneView. I have a need to temporarily hide a graphic and as a workaround,&amp;nbsp;I'm currently modifying&amp;nbsp;the definitionExpression to exclude that OBJECTID, then set it back later,&amp;nbsp;&lt;SPAN&gt;but that's kind of cumbersome with the network traffic depending on number of features.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm looking forward to more of these features coming to the MapView and the WebGL FeatureLayers in the future!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, thanks for the work on the new webpack plugin. It's made the process of integrating the API into our build so much easier!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 19 May 2018 12:54:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/v4-7-how-to-redraw-refresh-featurelayer-in-mapview/m-p/485513#M45202</guid>
      <dc:creator>DannyBritt1</dc:creator>
      <dc:date>2018-05-19T12:54:44Z</dc:date>
    </item>
  </channel>
</rss>

