Calculate Distance (server) Activity

Description

Calculates the shortest planar or geodesic distance between two geometries.

Usage

You may need to calculate the distance between two points. Unlike the Calculate Distance activity, the Calculate Distance (server) activity allows you to perform a geodesic calculation. You could take two points from a user using a Display Form activity and a Geometry Picker form element and calculate the distance using the Calculate Distance (server) activity.

Offline Support

This activity does not work when the device is offline.

Inputs

Url

Required

Type: String

The URL of the ArcGIS geometry service.

For example, https://utility.arcgisonline.com/ArcGIS/rest/services/Geometry/GeometryServer.

Geometry1

Required

Type: esri.Geometry (3.x, 4.x)*

The first geometry.

Geometry2

Required

Type: esri.Geometry (3.x, 4.x)*

The second geometry.

Unit

Optional

Type: String

Measurement unit of the return value.

Defaults to the units of the input geometries.

Known values: meters | feet | kilometers | miles | nautical-miles | yards.

Geodesic

Optional

Type: Boolean

When true, the geodesic distance between Geometry1 and Geometry2 is measured.

Defaults to false.

* Geocortex Workflow uses different versions of Esri's ArcGIS API for JavaScript depending on the type of application. Web AppBuilder 2D apps and Geocortex HTML5 viewers use version 3.x of the JavaScript API. Web AppBuilder 3D apps use version 4.x.

Outputs

distance

Type: Number

The distance between the two geometries.

* Geocortex Workflow uses different versions of Esri's ArcGIS API for JavaScript depending on the type of application. Web AppBuilder 2D apps and Geocortex HTML5 viewers use version 3.x of the JavaScript API. Web AppBuilder 3D apps use version 4.x.

Properties

For information about the ID, Display Name, and Description properties, see Properties Common to all Activities.

Version Information

Supported from: Geocortex Viewer for HTML5 2.9, Web AppBuilder for ArcGIS 2.4.

© 2019 Latitude Geographics Group Ltd. All Rights Reserved.

Documentation Version 5.10