Unit QML Type

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

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

Object

Inherited By:

AngularUnit, AreaUnit, and LinearUnit

Properties

Signals

Methods

Detailed Description

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

Unit is a base class inherited by subclasses representing different categories of measurement: LinearUnit, AngularUnit, and AreaUnit. The subclasses are used in measurement functions and spatial references. Many function parameters only accept specific types of measurement to reduce the chance of accidental use of inappropriate values, but some generic functions accept all unit types e.g. for translation from ID to text description.

LinearUnit - Projected coordinate systems define coordinates using linear measurements, for example using meters or miles. They are also used to return distance measurements, for example by some members of GeometryEngine.

AngularUnit - Geographic coordinate systems define coordinates using angular measurements, for example using degrees or radians.

AreaUnit - Projected coordinate systems define area units for two dimensional measurements such as the area enclosed by a ring, for example in acres or square kilometers.

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). Create the unit instances using the Unit base class or the subclass, passing in the enumeration for a specific unit of measurement.

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 subclasses, 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).


unitType : UnitType

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


wkid : int

The unit's well-known ID.

This property was introduced in Esri.ArcGISRuntime 100.14.


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.


wkidChanged()

Emitted when the wkid property changes.

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

Note: The corresponding handler is onWkidChanged.

This signal was introduced in Esri.ArcGISRuntime 100.14.


Method Documentation

Unit createFromWkid(int wkid)

Creates a Unit from a given wkid.

This method can only be accessed via the Factory object.


Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.