Calculate geometry in Web Appbuilder

855
4
11-18-2021 09:04 AM
bikeMapper312
New Contributor III

Hello, in my organization we have developed an app using the web app builder that edits a public web app. Within the edit version, we can make changes to attributes and draw new features. We would like to be able to calculate the geometry of one of our fields upon drawing a new feature, specifically length in miles. I don't know how to do this. For now, we can into the portal on ArcGIS Pro to calculate the field, but would prefer to be able to do it in the Web AppBuilder because it is easier. Any ideas? Thanks

 

**for more info, this is a layer of sidewalks in a city. Within the Web app builder edit version, we can edit attributes like "condition" or "length" or "managing entity." For length, I'd like to just be able to calculate geometry within the web app builder instead of doing it in arcgis pro.

0 Kudos
4 Replies
ABishop
MVP Regular Contributor

Hello,

Is your feature service published from an SDE to ArcGIS Server or hosted in ArcGIS Online?

Amanda Bishop, GISP
0 Kudos
bikeMapper312
New Contributor III

arcgis online

0 Kudos
ABishop
MVP Regular Contributor

I am not sure if this can be done previous to publishing the hosted service to ArcGIS Online, but possibly you could set up attribute rules for the field to calculate the geometry of the new features on the fly without having to do it manually?  I know this is possible when publishing from SDE to ArcGIS Server, but not sure if those rules would stick with a hosted feature.

Amanda Bishop, GISP
0 Kudos
shaylavi
Esri Contributor

Hi,

There are plenty of tools and ways for the calculation to be performed -

https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-geometryEngine.html

https://developers.arcgis.com/javascript/3/jssamples/util_measurepoly.html

But you mentioned you're using ArcGIS Online, which means you don't have the ability to develop and host a custom solution like the one you ask for.

You need to use WebApp Builder Developer Edition to be able to achieve your required functionality - 

https://developers.arcgis.com/web-appbuilder/guide/xt-welcome.htm

 

Shay