HOW TO

Change the default output spatial reference of the Print widget in ArcGIS Web AppBuilder (Developer Edition)

Last Published: November 18, 2021

Summary

The default output spatial reference of the Print widget in ArcGIS Web AppBuilder is the WGS 1984 Web Mercator Auxiliary Sphere with well-known ID (WKID) 102100. When using the Print widget and setting the Force scale option to a value that prints a specific map extent, the output map extent is sometimes smaller than the specified extent. This discrepancy increases if the data is located farther away from the Equator. To reduce map extent discrepancies, the output spatial reference must be set to a local spatial reference depending on the location of the data.

The instructions provided describe how to preset the Print widget in ArcGIS Web AppBuilder (Developer Edition) to use a local spatial reference that produces accurate output measurements.

Procedure

  1. Open the ArcGIS Web AppBuilder folder and navigate to the Print widget JavaScript file. The file is located in the following path:
C:\ArcGISWebAppBuilder\server\apps\<app id>\widgets\Print
Double-click the Print.js file to open it.
  1. In the JavaScript file, go to line 149 and replace this.wkidInput.set('value', this.map.spatialReference.wkid) with this.wkidInput.set('value',<local spatial reference WKID>). In this example, the new local spatial reference WKID is 103434.
Line 149 of the Print widget JavaScript file.
  1. Save the edited JavaScript file.
  2. Refresh the app and open the advanced settings of the Print widget. The inserted WKID is the default spatial reference of the Print widget.
The new default WKID.

Article ID:000022627

Software:
  • ArcGIS Web AppBuilder

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options