Skip To Content ArcGIS for Developers Sign In Dashboard

Unit QML Type

Base type for types that represent a unit of measurement. More...

Import Statement: import Esri.ArcGISRuntime 100.9
Since: Esri.ArcGISRuntime 100.0
Inherits:

Object

Inherited By:

AngularUnit, AreaUnit, and LinearUnit

Properties

Signals

Detailed Description

Note: You cannot declare or create a component of this type in QML code.

Unit is a base class inherited by subtypes representing different categories of measurement: LinearUnit, AngularUnit, and AreaUnit. The subtypes are used in measurement functions and spatial references.

Different units of measurement can be used throughout ArcGIS Runtime. Projected coordinate systems define coordinates using linear measurements, for example using meters or miles, which are represented by LinearUnit. Linear units are also used to return distance measurements, for example by some members of GeometryEngine. Geographic coordinate systems define coordinates using angular measurements, for example using degrees or radians, which are represented by AngularUnit. Methods that calculate the size of areas, for example in acres or square kilometers, use area units. These are represented by AreaUnit. Linear, angular, and area units can be defined by using enumerations of the most common units of measurement. They can also be defined by Well-Known ID (WKID) or Well-Known Text (WKText).

Each instance has properties for the unit name (singular, plural and abbreviated) and provides methods for unit conversion between different units of measurement in the same category of measurement. All unit names and abbreviations are returned in the English language.

Create Unit instances using the subtypes, passing in the enumeration for a specific unit of measurement. Custom unit implementations are not supported.

Instances of Unit are immutable.

Property Documentation

abbreviation : string

Returns the abbreviated name of this unit (read-only).


displayName : string

Returns the singular display name of this unit (read-only).


name : string

Returns the name of this unit (read-only).


pluralDisplayName : string

Returns the plural display name of this unit (read-only).


unitId : int

The unit ID.


unitType : UnitType

Returns the Enums.UnitType type of this unit (read-only).


Signal Documentation

abbreviationChanged()

Emitted when the abbreviation property changes.

Note: This signal will only be emitted when the property initializes during the instantiation of the component.

Note: The corresponding handler is onAbbreviationChanged.

This signal was introduced in Esri.ArcGISRuntime 100.4.


displayNameChanged()

Emitted when the displayName property changes.

Note: This signal will only be emitted when the property initializes during the instantiation of the component.

Note: The corresponding handler is onDisplayNameChanged.

This signal was introduced in Esri.ArcGISRuntime 100.4.


nameChanged()

Emitted when the name property changes.

Note: This signal will only be emitted when the property initializes during the instantiation of the component.

Note: The corresponding handler is onNameChanged.

This signal was introduced in Esri.ArcGISRuntime 100.4.


pluralDisplayNameChanged()

Emitted when the pluralDisplayName property changes.

Note: This signal will only be emitted when the property initializes during the instantiation of the component.

Note: The corresponding handler is onPluralDisplayNameChanged.

This signal was introduced in Esri.ArcGISRuntime 100.4.


unitIdChanged()

Emitted when the unitId property changes.

Note: This signal will only be emitted when the property initializes during the instantiation of the component.

Note: The corresponding handler is onUnitIdChanged.

This signal was introduced in Esri.ArcGISRuntime 100.4.



Feedback on this topic?