FAQ: Is it possible to calculate statistics for the length and area of features in a web app?
Is it possible to calculate statistics for the length and area of features in a web app?
Yes, it is possible to get statistics for feature lengths and areas in a web app by using the Summary widget. The Summary widget is available when building apps through Web AppBuilder for ArcGIS. This widget allows numeric attributes from a feature layer to be summarized based on the features that fall within the current map extent. The widget can be used more than once in the Web AppBuilder configuration. Therefore, multiple layers can use the Summary widget, where each layer uses its own version. The Summary widget can display the sum of the areas and lengths of the features in the web map as long as this information is stored in the attribute table.
The image below is an example of using the Summary widget in Web AppBuilder for ArcGIS:
Map services display ShapeArea and ShapeLength within the attribute table in the units of the projection that is set in the feature class prior to uploading to ArcGIS Online. When working with Esri basemaps in a web map, the features are displayed in the Web Mercator Auxiliary Sphere projection. Depending on the projection used when the length and area values were calculated in the attribute table, the lengths and areas may not match what is seen in the web map. For more details, refer to the following documentation:
- FAQ: Why are my map, distance, and area measurements wrong when using WGS 1984 Web Mercator?
- How To: Select a suitable map projection or coordinate system
- Web AppBuilder for ArcGIS: Summary widget
- Web AppBuilder for ArcGIS
- Web AppBuilder for ArcGIS (Developers Edition)