<?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: Possible Bug with WMS Raster Layer Printing in ArcGIS Core 4.33.14 in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/possible-bug-with-wms-raster-layer-printing-in/m-p/1652439#M87638</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/552520"&gt;@mukecz1&lt;/a&gt;,&amp;nbsp;thanks for posting your question here. It sounds like there is an issue with the URL passed to the print service. Here are the facts as I understood them:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;WMS raster layer from GeoServer.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Prints correctly if the raster contains RGB values.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Does not print&amp;nbsp;if the raster only contains a grey index with a style.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I have a hunch about what's going on, but it would be super helpful if you could share a test-app or test services so I could reproduce on my end and compare?&lt;/P&gt;</description>
    <pubDate>Tue, 23 Sep 2025 14:29:18 GMT</pubDate>
    <dc:creator>Noah-Sager</dc:creator>
    <dc:date>2025-09-23T14:29:18Z</dc:date>
    <item>
      <title>Possible Bug with WMS Raster Layer Printing in ArcGIS Core 4.33.14</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/possible-bug-with-wms-raster-layer-printing-in/m-p/1652287#M87635</link>
      <description>&lt;P&gt;Hi Esri,&lt;/P&gt;&lt;P&gt;I believe this may be a bug. I’m using PrintParameters from &lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/642472"&gt;@ArcGIS&lt;/a&gt;/core version 4.33.14.&lt;/P&gt;&lt;P&gt;I can add a WMS raster layer from GeoServer, and it prints correctly if the raster contains RGB values. However, if the raster only contains a grey index with a style, the layer does not display in the printed map.&lt;/P&gt;&lt;P&gt;The printing function I’m using is &lt;STRONG&gt;Execute Task&lt;/STRONG&gt; of ArcGIS Server.&lt;/P&gt;&lt;P&gt;What I found:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Direct WMS URL works:&lt;/STRONG&gt;&lt;BR /&gt;If the WMS URL is &lt;A href="https://xyzx:8443/geoserver/wms" target="_blank" rel="noopener"&gt;https://xyzx:8443/geoserver/wms&lt;/A&gt;, it prints correctly. For example:&lt;/P&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;PRE&gt;{
  "type": "wms",
  "customLayerParameters": null,
  "customParameters": null,
  "transparentBackground": true,
  "visibleLayers": ["LayerName"],
  "url": "https://xyzx:8443/geoserver/wms",
  "version": "1.3.0",
  "id": "19973df88a0-layer-53",
  "title": "Canopy 05 metre",
  "opacity": 1,
  "minScale": 0,
  "maxScale": 0
}&lt;/PRE&gt;&lt;OL&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Using PrintParameters automatically:&lt;/STRONG&gt;&lt;/P&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;PRE&gt;const params = new PrintParameters({
  view: view.value,
  template: template,
  outSpatialReference: spatialReference
} as PrintParametersProperties);&lt;/PRE&gt;&lt;P&gt;It automatically uses the layers on the MapView. For the WMS raster layer, the URL it passes becomes:&lt;BR /&gt;&lt;A href="https://xyz:8443/geoserver/ows?version=1.3.0" target="_blank" rel="noopener"&gt;https://xyz:8443/geoserver/ows?version=1.3.0&lt;/A&gt;&lt;/P&gt;&lt;P&gt;This URL does &lt;STRONG&gt;not&lt;/STRONG&gt; work, and the grey-index raster layer with a style is not displayed in the printed map.&lt;/P&gt;&lt;P&gt;Could you advise if this is expected behavior or a bug?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 23 Sep 2025 01:52:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/possible-bug-with-wms-raster-layer-printing-in/m-p/1652287#M87635</guid>
      <dc:creator>mukecz1</dc:creator>
      <dc:date>2025-09-23T01:52:19Z</dc:date>
    </item>
    <item>
      <title>Re: Possible Bug with WMS Raster Layer Printing in ArcGIS Core 4.33.14</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/possible-bug-with-wms-raster-layer-printing-in/m-p/1652439#M87638</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/552520"&gt;@mukecz1&lt;/a&gt;,&amp;nbsp;thanks for posting your question here. It sounds like there is an issue with the URL passed to the print service. Here are the facts as I understood them:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;WMS raster layer from GeoServer.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Prints correctly if the raster contains RGB values.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Does not print&amp;nbsp;if the raster only contains a grey index with a style.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I have a hunch about what's going on, but it would be super helpful if you could share a test-app or test services so I could reproduce on my end and compare?&lt;/P&gt;</description>
      <pubDate>Tue, 23 Sep 2025 14:29:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/possible-bug-with-wms-raster-layer-printing-in/m-p/1652439#M87638</guid>
      <dc:creator>Noah-Sager</dc:creator>
      <dc:date>2025-09-23T14:29:18Z</dc:date>
    </item>
    <item>
      <title>Re: Possible Bug with WMS Raster Layer Printing in ArcGIS Core 4.33.14</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/possible-bug-with-wms-raster-layer-printing-in/m-p/1653761#M87665</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/169842"&gt;@Noah-Sager&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Unfortunately, I cannot share either the app or the service. The workaround for me is to use this code before passing it to&lt;/P&gt;&lt;DIV&gt;&lt;PRE&gt;PrintParameters&lt;/PRE&gt;&lt;/DIV&gt;&lt;P&gt;. As you can see, I only replaced the URL endpoint from &lt;STRONG&gt;/ows?version=1.3.0&lt;/STRONG&gt;&amp;nbsp;to &lt;STRONG&gt;/wms&lt;/STRONG&gt;:&lt;/P&gt;&lt;DIV&gt;&lt;PRE&gt;mapView.&lt;SPAN&gt;map&lt;/SPAN&gt;.&lt;SPAN&gt;allLayers&lt;/SPAN&gt;.&lt;SPAN&gt;forEach&lt;/SPAN&gt;((layer: &lt;SPAN&gt;any&lt;/SPAN&gt;) =&amp;gt; {&lt;BR /&gt;  &lt;SPAN&gt;if &lt;/SPAN&gt;(layer &amp;amp;&amp;amp; layer.&lt;SPAN&gt;visible &lt;/SPAN&gt;&amp;amp;&amp;amp; layer.&lt;SPAN&gt;type &lt;/SPAN&gt;=== &lt;SPAN&gt;'wms' &lt;/SPAN&gt;&amp;amp;&amp;amp; layer.&lt;SPAN&gt;url &lt;/SPAN&gt;&amp;amp;&amp;amp; layer.&lt;SPAN&gt;url&lt;/SPAN&gt;.&lt;SPAN&gt;includes&lt;/SPAN&gt;(&lt;SPAN&gt;'/ows?version='&lt;/SPAN&gt;)) {&lt;BR /&gt;    &lt;SPAN&gt;// Store original URL for restoration&lt;BR /&gt;&lt;/SPAN&gt;    wmsLayersToRestore.&lt;SPAN&gt;push&lt;/SPAN&gt;({ layer&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;originalUrl&lt;/SPAN&gt;: layer.&lt;SPAN&gt;url &lt;/SPAN&gt;})&lt;SPAN&gt;;&lt;BR /&gt;&lt;/SPAN&gt;    &lt;SPAN&gt;// Temporarily correct the URL&lt;BR /&gt;&lt;/SPAN&gt;    layer.&lt;SPAN&gt;url &lt;/SPAN&gt;= layer.&lt;SPAN&gt;url&lt;/SPAN&gt;.&lt;SPAN&gt;replace&lt;/SPAN&gt;(&lt;SPAN&gt;/&lt;/SPAN&gt;&lt;SPAN&gt;\/&lt;/SPAN&gt;&lt;SPAN&gt;ows\?version=[\d.]+/g&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;'/wms'&lt;/SPAN&gt;)&lt;SPAN&gt;;&lt;BR /&gt;&lt;/SPAN&gt;  }&lt;BR /&gt;})&lt;SPAN&gt;;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;/DIV&gt;&lt;P&gt;And restore them after printing by using:&lt;/P&gt;&lt;DIV&gt;&lt;PRE&gt;wmsLayersToRestore.&lt;SPAN&gt;forEach&lt;/SPAN&gt;(({ layer&lt;SPAN&gt;, &lt;/SPAN&gt;originalUrl }) =&amp;gt; {&lt;BR /&gt;  layer.&lt;SPAN&gt;url &lt;/SPAN&gt;= originalUrl&lt;SPAN&gt;;&lt;BR /&gt;&lt;/SPAN&gt;})&lt;SPAN&gt;;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 29 Sep 2025 05:51:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/possible-bug-with-wms-raster-layer-printing-in/m-p/1653761#M87665</guid>
      <dc:creator>mukecz1</dc:creator>
      <dc:date>2025-09-29T05:51:27Z</dc:date>
    </item>
  </channel>
</rss>

