Add x y coordinates in web map layer

10274
17
12-28-2016 01:06 PM
Status: Open
MegHoole1
New Contributor III

I'd like to see an add x y coordinate tool for feature layers in AGO web maps.  X Y cords in lat long decimal degrees would be excellent.

Users using new Esri tools such as trek2there that requires lat and long fields from the attribute table as input  https://blogs.esri.com/esri/arcgis/2016/12/22/introducing-trek2there/ would benefit, and AGO users wouldn't have to add x y cords in desktop only to republish a layer with x y cords.

17 Comments
JakubSisak

same error here. this is not working. works on a simple scenario when a feature class is published from a desktp file geodatabase but when publishing services as references on an enterprise SDE, the Geometry($feature) object is null and has no members (X, Y, Z) and therefore cannot be used to obtain any values from the geometry of the feature.

ElbaMolina

Hi Michael,

I used your code, works fine in webmap's popup but when I look it in Collector, doesn't.

I'm doing something wrong?

For Long1 and Lat1 I used a simple arcade expression

Geometry($feature)

Please if you can help me with this I'll appreciate it.

Andrus_Nicholas

Hey Michael,

Thanks for providing this code.

For some reason I am unable to get it to work in the intended hosted feature layer but it works fine when I create a copy of said layer.

-Copied layer

-Original

You mentioned that this will not work in Collector - do you mean that it will not work in layers that are built via Collector or just that it won't be viewable in Collector?

Thanks for any information you can provide.

2Quiker

I am trying to use the "Dynamically create a hyperlink with lat long values in a popup" from github and trying to use the Google Panoramic but when the code and click on the map I get a popup and it's just black, not sure what the issues is?

Also can it be changed to add Bings Birds view, if so how?

 

 

2Quiker

I was able to figure it out but my zoom is not working, no matter what I change the lvl to 1-20 nothing ever happens, anyone have any idea as to why the lvl doesn't work?

"https://www.bing.com/maps?&style=o&lvl=20&dir=0&cp=" + text(Latitude) + "~" + text(Longitude);

RobynSnookCCB

Any updates if ESRI has added this feature yet or plan to?

ChrisAt

Yes, totally agree with this.  Our previous web GIS allowed you to manually input an easting/northing or x,y values and snapped the map to it.  All it needs is a simple widget to allow this in ArcGIS Online.

To get around this shortcoming I have had to capture a set of points every 100 metres to cover our local authority area and ask users to use the search for a rounded co-ordinate value to match the point e.g. 488100,169100  It works, but only to the nearest 100m and its a waste of point data and storage space.  If I had a larger authority area I wouldn't consider it.