Has anyone got any info or documentation on how to work with a geometry object using the new 'Arcade' expression language just introduced to ArcGIS Online?
e.g. at the simplest level, how would you access the area of a polygon and return that, perhaps converted to a particular measurement unit?
Cheer,
-Paul
There is an example here:
Introducing Arcade | ArcGIS Blog
Round($feature.Area * 0.000247105, 3) + " Acres"
thanks Andrew - I hadn't seen that particular blog post.
This example does not actually use the Geometry object though, it expects a field called "Area".
aaaahhh good point. So the original question remains....
because in the blog example, it assumes that the Area field is already populated somehow. Whereas, using the actual geometry object would allow the label to dynamically update on the fly as the geometry changes.
I'll leave the question open then in case someone else knows. I've looked over the Arcade developer site but it's doesn't seem to go into detail around the geometry object properties and methods...
I just amended my last post to mention that I've looked through there but can't find the info I'm after...
Hi Paul,
I'm after the same info as you to work with my ArcGIS Server feature services. Not sure if you are working with Hosted Feature Layers or ArcGIS Server Services, but with recent releases (Dec 2016) to AGO, hosted Feature Layers now show geometry fields. If you have feature layers that you created before the Dec 2016 update, you'll have to run an "update" on those older feature layers to get at this functionality.
Ryan