PROBLEM

Extracted XY coordinates inaccurate for local or projected coordinate system in ArcGIS Online or Enterprise Map Viewer

Last Published: July 31, 2025

Description

In ArcGIS Online or Enterprise Map Viewer, XY coordinates can be extracted using Arcade expressions within the attribute table or pop-ups. However, when extracting coordinates from feature layers that use local or projected coordinate systems, the output values are incorrect.

The image below shows the extracted XY coordinates from the projected coordinate system (WKID: 103768) in ArcGIS Online and Enterprise Map Viewer, compared to the actual XY coordinates expected from the source projection.

The attribute table of the feature layer

Cause

ArcGIS Online and Enterprise Map Viewer use WGS 1984 Web Mercator (Auxiliary Sphere) as the default coordinate system. Although calculations are performed using the spatial reference in which a feature layer is published, the Map Viewer does not support on-the-fly reprojection of geometries during coordinate extraction or field calculations. Consequently, dynamic projection is not applied, which results in incorrect XY coordinate values when working with feature layers that use local or other projected coordinate systems.

Solution or Workaround

As Map Viewer does not support on-the-fly reprojection during field calculations, it is necessary to perform geometry calculations in ArcGIS Pro and republish the feature layer with the updated attributes to ensure accurate XY coordinates.

  1. Export and download the hosted feature layer in the file geodatabase format. Refer to ArcGIS Online: Export data from hosted feature layers or hosted tables or Portal for ArcGIS: Export data from hosted feature layers or hosted tables for instructions.
Note:
Alternatively, extract the data from the feature layers using the Extract Data tool in Map Viewer. Refer to ArcGIS Online: Extract Data or Portal for ArcGIS: Extract Data for more information.
  1. Open the project in ArcGIS Pro and add the downloaded dataset to the map. Refer to ArcGIS Pro: Add data from a folder for instructions.
  2. Create X and Y coordinate fields in the attribute table of the added dataset. Refer to ArcGIS Pro: Create a field and apply a domain and default value for instructions.
  3. Extract XY coordinates into the newly created fields using the Calculate Geometry Attributes tool.
  4. Republish the feature layer as a web feature layer to ArcGIS Online or the ArcGIS Enterprise portal. Refer to ArcGIS Pro: Share a web feature layer using the default configuration for instructions.

Article ID: 000037067

Software:
  • ArcGIS Pro
  • ArcGIS Online
  • Portal for ArcGIS

Receive notifications and find solutions for new or common issues

Get summarized answers and video solutions from our new AI chatbot.

Download the Esri Support App

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options