Display X,Y coordinates in Field Maps

529
1
04-19-2021 06:58 PM
MorellaLodise
New Contributor

Can I display  X,Y projected coordinates for a Map published in a customized Albers Projection on Field Maps?

0 Kudos
1 Reply
DougBrowning
MVP Notable Contributor

Here is the code to get WGS84 using Arcade.  Just thought it may help.

CurrentLat
var originShift = 2.0 * PI * 6378137.0 / 2.0;
var lon = (Geometry($feature).x / originShift) * 180.0;
var lat = (Geometry($feature).y / originShift) * 180.0;

lat = 180.0 / PI * (2.0 * Atan( Exp( lat * PI / 180.0)) - PI / 2.0);

return lat;

CurrentLong
var originShift = 2.0 * PI * 6378137.0 / 2.0;
var lon = (Geometry($feature).x / originShift) * 180.0;
var lat = (Geometry($feature).y / originShift) * 180.0;

lat = 180.0 / PI * (2.0 * Atan( Exp( lat * PI / 180.0)) - PI / 2.0);

return lon;

Hope it helps

0 Kudos