Select to view content in your preferred language

Print map component initializes with error

96
7
Thursday
ShaneBuscher
Frequent Contributor

 

I am running into a problem simply adding the Print map component, which results in an error. Network traffic shows successful calls to the print service, returning valid info. However, I can't get around the UI error. All console warnings and errors have been cleared, so there are no other clues. I'm using multiple other components just fine. This is a React 19 app using 4.32.13 map components.

<arcgis-map
  id="mapEl"
  className="map-container"
>
  <arcgis-print
	printServiceUrl="https://gis.acme.com/rest/services/Print/GPServer/Export%20Web%20Map"
  ></arcgis-print>
  <arcgis-zoom position="bottom-left"></arcgis-zoom>
</arcgis-map>

ShaneBuscher_0-1750949615028.png

 

Tags (1)
0 Kudos
7 Replies
MichaelVolz
Esteemed Contributor

Are you trying to print layers from AGOL?  If so, maybe the AGOL issues from the recent update are impacting your print service.

ShaneBuscher
Frequent Contributor

Hi Michael,

The Print component is set up to use an internal Export Web Map print service. This is done by specifying the print-service-url in the code. According to the documentation, when you set the print-service-url the component does not use Portal/ArcGIS Online. Instead it uses the direct service url that is provided.

0 Kudos
Noah-Sager
Esri Regular Contributor

@ShaneBuscher - do you have the Get Layout Templates Info Task published as well (possibly at this url)?

https://gis.acme.com/rest/services/Print/GPServer/Get%20Layout%20Templates%20Info%20Task

Does this print service work with the Print widget? Did it work with the Print component previously?

0 Kudos
ShaneBuscher
Frequent Contributor

@Noah-Sager I do not have the Get Layout Templates task published. That is certainly something I can try. Only the REST endpoint has been used so the Print widget hasn't been tested and no previous Print components previously worked. 

0 Kudos
Noah-Sager
Esri Regular Contributor

@ShaneBuscher - bingo, that's probably it. It's required for custom print services. The Print widget could maybe work around that, but the Print component will not. 

0 Kudos
Noah-Sager
Esri Regular Contributor

There is an ArcGIS Online service disruption currently that may be affecting printing. If the issue is new today, I suggest waiting until the disruption is resolved. If the issue is old, we recently released a new version of the SDK that you could test with.
https://developers.arcgis.com/javascript/latest/release-notes/

test-app: https://codepen.io/noash/pen/WbvKXKE

 

0 Kudos
ShaneBuscher
Frequent Contributor

I'm not using ArcGIS Online but thanks for the heads up.

0 Kudos