How to work with 'geometry' object in new AGOL 'Arcade' expression language

2504
7
12-15-2016 12:38 PM
by Anonymous User
Not applicable

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

7 Replies
AndrewKeith3
Occasional Contributor

There is an example here:

Introducing Arcade | ArcGIS Blog 

Round($feature.Area * 0.000247105, 3) + " Acres"

by Anonymous User
Not applicable

thanks Andrew - I hadn't seen that particular blog post.

0 Kudos
AndrewKeith3
Occasional Contributor

This example does not actually use the Geometry object though, it expects a field called "Area".

0 Kudos
by Anonymous User
Not applicable

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...

ArcGIS Arcade | ArcGIS for Developers 

AndrewKeith3
Occasional Contributor
0 Kudos
by Anonymous User
Not applicable

  I just amended my last post to mention that I've looked through there but can't find the info I'm after...

0 Kudos
RyanNosek
Occasional Contributor II

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