<?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: ImageryLayer.effect Bug 4.19, 4.20 in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/imagerylayer-effect-bug-4-19-4-20/m-p/1089736#M74311</link>
    <description>&lt;P&gt;Hi there,&amp;nbsp;&lt;/P&gt;&lt;P&gt;This issue is fixed at version 4.21 and it is planned to be released end of September. You can test the fix by pointing your app to&amp;nbsp; &amp;lt;script src="&lt;A href="https://js.arcgis.com/next/" target="_blank"&gt;https://js.arcgis.com/next/&lt;/A&gt;"&amp;gt;&amp;lt;/script&amp;gt;.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for reporting this issue,&amp;nbsp;&lt;/P&gt;&lt;P&gt;-Undral&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 17 Aug 2021 19:35:57 GMT</pubDate>
    <dc:creator>UndralBatsukh</dc:creator>
    <dc:date>2021-08-17T19:35:57Z</dc:date>
    <item>
      <title>ImageryLayer.effect Bug 4.19, 4.20</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/imagerylayer-effect-bug-4-19-4-20/m-p/1079528#M73902</link>
      <description>&lt;P&gt;Starting in 4.19, and including 4.20, setting the &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-ImageryLayer.html#effect" target="_self"&gt;effect&lt;/A&gt; property on instances of &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-ImageryLayer.html" target="_self"&gt;ImageryLayer&lt;/A&gt; has no effect.&amp;nbsp; This can be verified in the &lt;A href="https://developers.arcgis.com/javascript/latest/sample-code/sandbox/?sample=layers-imagerylayer" target="_self"&gt;sandbox&lt;/A&gt; for the sample &lt;A href="https://developers.arcgis.com/javascript/latest/sample-code/layers-imagerylayer/" target="_self"&gt;Intro to ImageryLayer&lt;/A&gt;.&amp;nbsp; In the constructor for the layer on line 39, you can add an effect property like so:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;const layer = new ImageryLayer({
    effect: "grayscale(100%)",
    url:
        "https://sampleserver6.arcgisonline.com/arcgis/rest/services/NLCDLandCover2001/ImageServer",
    format: "jpgpng" // server exports in either jpg or png format
});&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When you refresh the sample using the Refresh button at the top-right of the page, you see the layer in full color as before.&amp;nbsp; Now, go to line 16 and change the API version to 4.18 like so:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;script src="https://js.arcgis.com/4.18/"&amp;gt;&amp;lt;/script&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When you refresh the sample again, the layer now renders in grayscale, as it should.&amp;nbsp; Other 4.19 layer types, like FeatureLayer, MapImageLayer, and TileLayer work just fine in this regard; the issue seems limited to ImageryLayer.&lt;/P&gt;&lt;P&gt;I can't fully explain the issue, as I don't fully understand it, but the following workaround is working for me in version 4.19 (I'm unable to verify it in 4.20 since it's not available for download yet).&amp;nbsp; If you have a locally hosted copy of the API, make the following change in esri\views\2d\layers\ImageryLayerView2D.js:&lt;/P&gt;&lt;P&gt;Search for:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;this.watch("timeExtent",()=&amp;gt;{&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Replace with:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;this.watch("layer.effect",()=&amp;gt;{this.subview.container.effect=this.get("layer.effect")}),this.watch("timeExtent",()=&amp;gt;{&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Jul 2021 00:41:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/imagerylayer-effect-bug-4-19-4-20/m-p/1079528#M73902</guid>
      <dc:creator>JoelBennett</dc:creator>
      <dc:date>2021-07-16T00:41:08Z</dc:date>
    </item>
    <item>
      <title>Re: ImageryLayer.effect Bug 4.19, 4.20</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/imagerylayer-effect-bug-4-19-4-20/m-p/1079690#M73911</link>
      <description>&lt;P&gt;Hi Joel - thank you for reporting this. We are looking into this bug and hope to have it fixed soon.&lt;/P&gt;</description>
      <pubDate>Fri, 16 Jul 2021 15:32:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/imagerylayer-effect-bug-4-19-4-20/m-p/1079690#M73911</guid>
      <dc:creator>AnneFitz</dc:creator>
      <dc:date>2021-07-16T15:32:07Z</dc:date>
    </item>
    <item>
      <title>Re: ImageryLayer.effect Bug 4.19, 4.20</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/imagerylayer-effect-bug-4-19-4-20/m-p/1089736#M74311</link>
      <description>&lt;P&gt;Hi there,&amp;nbsp;&lt;/P&gt;&lt;P&gt;This issue is fixed at version 4.21 and it is planned to be released end of September. You can test the fix by pointing your app to&amp;nbsp; &amp;lt;script src="&lt;A href="https://js.arcgis.com/next/" target="_blank"&gt;https://js.arcgis.com/next/&lt;/A&gt;"&amp;gt;&amp;lt;/script&amp;gt;.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for reporting this issue,&amp;nbsp;&lt;/P&gt;&lt;P&gt;-Undral&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 17 Aug 2021 19:35:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/imagerylayer-effect-bug-4-19-4-20/m-p/1089736#M74311</guid>
      <dc:creator>UndralBatsukh</dc:creator>
      <dc:date>2021-08-17T19:35:57Z</dc:date>
    </item>
    <item>
      <title>Re: ImageryLayer.effect Bug 4.19, 4.20</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/imagerylayer-effect-bug-4-19-4-20/m-p/1113459#M75153</link>
      <description>&lt;P&gt;After upgrading to 4.21, I have found this issue is indeed fixed.&amp;nbsp; Thank you!&lt;/P&gt;</description>
      <pubDate>Tue, 02 Nov 2021 23:33:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/imagerylayer-effect-bug-4-19-4-20/m-p/1113459#M75153</guid>
      <dc:creator>JoelBennett</dc:creator>
      <dc:date>2021-11-02T23:33:24Z</dc:date>
    </item>
  </channel>
</rss>

