<?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: arcgis javascript imagery layer refresh method in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/arcgis-javascript-imagery-layer-refresh-method/m-p/438717#M40395</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I can't recall the exact details, but I think I've used this in the past:&lt;/P&gt;&lt;PRE class="language-javascript line-numbers"&gt;&lt;CODE&gt;view&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;extent &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; view&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;extent&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;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 29 Jan 2018 22:47:54 GMT</pubDate>
    <dc:creator>JohnGrayson</dc:creator>
    <dc:date>2018-01-29T22:47:54Z</dc:date>
    <item>
      <title>arcgis javascript imagery layer refresh method</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/arcgis-javascript-imagery-layer-refresh-method/m-p/438716#M40394</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As of version 4.6, the arcgis javascript API does not support a refresh method on a layer in a 3D scene view (only supported in 2D map view). See 'Known Limitations' here&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-ImageryLayer.html#refresh" title="https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-ImageryLayer.html#refresh"&gt;ImageryLayer | API Reference | ArcGIS API for JavaScript 4.6&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I thought I'd share what I've found as a workaround. You simply set the layer visibility to false then set a zero length timer to set it back to true (it does not work to set it back to true without the timeout, for whatever reason).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A sample:&lt;/P&gt;&lt;P&gt;&lt;CODE&gt; activeImageryLayer.visible = false;&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE&gt;window.setTimeout(function() { activeImageryLayer.visible = true; }, 0); &lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The downside here is that it does visibly 'flicker' the layer when it is turned off. This is acceptable for my project but is still a little janky.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'd be interested to hear what others have implemented as a workaround for this glaring omission from the API.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 27 Jan 2018 22:15:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/arcgis-javascript-imagery-layer-refresh-method/m-p/438716#M40394</guid>
      <dc:creator>DavidPuckett</dc:creator>
      <dc:date>2018-01-27T22:15:03Z</dc:date>
    </item>
    <item>
      <title>Re: arcgis javascript imagery layer refresh method</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/arcgis-javascript-imagery-layer-refresh-method/m-p/438717#M40395</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I can't recall the exact details, but I think I've used this in the past:&lt;/P&gt;&lt;PRE class="language-javascript line-numbers"&gt;&lt;CODE&gt;view&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;extent &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; view&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;extent&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;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Jan 2018 22:47:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/arcgis-javascript-imagery-layer-refresh-method/m-p/438717#M40395</guid>
      <dc:creator>JohnGrayson</dc:creator>
      <dc:date>2018-01-29T22:47:54Z</dc:date>
    </item>
  </channel>
</rss>

