Select to view content in your preferred language

Arcade: Add Native Latitude and Longitude Functionality

461
1
03-16-2023 10:43 AM
Status: Open
DavidSolari
Occasional Contributor III

A common request I get is to surface the latitude and longitude of spatial data as attributes for ease of use in online data tables and pop-ups. The most timely way to do this is an Arcade expression in either a pop-up or attribute rule to calculate the values. This currently requires the user to compute the transformation themselves, which is error-prone and difficult to read in the context of an Arcade script.

My request is a way to get lat/lon through built-in Arcade functionality, either through functions or properties on the Geometry object type. Only supporting Web Mercator data sources is great as a first step but supporting all projections would be ideal as this increases the portability of all scripts. This would require support for both the Attribute Rules and Popup profiles for my use cases but could be expanded to many more profiles.

I'd also take implementing this projection idea as a suitable solution, although adding lat/lon access as a convenience on top of that idea would be even better.

1 Comment
FEMAUrbanSearchandRescue

Agreed! We would like to see USNG/MGRS as a native functionality in Arcade (or as a "device variable") as well. Calculate USNG Coordinates in Arcade - Esri Community