Morning,
I was wondering if it is possible to use an arcade expression in a pop-up to generate a British National Grid reference in AGOL?
I have been able to do this in ArcGIS Pro in a project which is projected to the British National Grid, calculating geometry attributes for an xy and then using a some python coding to generate a BNG reference from that.
I can also use arcade expressions to show the lat long of a feature in AGOL and or show a BNG reference from an existing xy field in the hosted feature layer.
So is it possible to do this all in AGOL? Take a feature, get the xy and then generate a BNG reference?
I expect that there would be an issue with AGOL using WGS84 Web Mercator (Auxiliary Sphere).
Thanks,
Andy
As far as I'm aware there's no direct way to convert this to return a grid reference from xy, however, I suppose there's a couple of ways you could muckle together a solution.
One would be to download the grids and have this as part of the map, whether it's shown or not, and then have arcade return the result from the grid with the info taken from xy.
The other would be to create a script pre-populating all the grid parameters so that when xy is generated the return is then calculated entirely in script.