Select to view content in your preferred language

Converting geometry($feature) coordinates in a pop-up to decimal degrees?

7288
11
Jump to solution
12-12-2019 02:02 PM
DenaS
by
Emerging Contributor

In arc gis online, I have a point feature map. When I create a new feature, I would like it to calculate the latitude and longitude in decimal degrees.

Right now, I am using the following code in the Arcade, but the coordinates are in the wrong format for my uses.

var geom = Geometry($feature);
return "(" + Round(geom.x, 3) + ", " + Round(geom.y, 3) + ")";

example of the returned data: (-17583389.106, 2474881.059)

What is the right expression for obtaining decimal degrees instead of what is provided above?

0 Kudos
11 Replies
simoxu
by MVP Regular Contributor
MVP Regular Contributor

Have you found the answer? I am looking for a method to convert from MGA 1994 Zone 55 to Decimal Degrees? 

0 Kudos
KaraUtter
Frequent Contributor

@XanderBakker I need the decimal degrees to appear like they do in your script, but when I copied and pasted it into my arcade expression builder in Map Viewer, it returns the following error that I don't understand:

KaraUtter_0-1662145875254.png

 

0 Kudos