Hi Esri,
I believe this may be a bug. I’m using PrintParameters from @ArcGIS/core version 4.33.14.
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.
The printing function I’m using is Execute Task of ArcGIS Server.
What I found:
Direct WMS URL works:
If the WMS URL is https://xyzx:8443/geoserver/wms, it prints correctly. For example:
{
"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
}Using PrintParameters automatically:
const params = new PrintParameters({
view: view.value,
template: template,
outSpatialReference: spatialReference
} as PrintParametersProperties);It automatically uses the layers on the MapView. For the WMS raster layer, the URL it passes becomes:
https://xyz:8443/geoserver/ows?version=1.3.0
This URL does not work, and the grey-index raster layer with a style is not displayed in the printed map.
Could you advise if this is expected behavior or a bug?
Thanks