Base type for types that represent a unit of measurement. More...
Import Statement: | import Esri.ArcGISRuntime 100.15 |
Since: | Esri.ArcGISRuntime 100.0 |
Inherits: | |
Inherited By: | AngularUnit, AreaUnit, and LinearUnit |
Properties
- abbreviation : string
- displayName : string
- name : string
- pluralDisplayName : string
- unitType : UnitType
- wkid : int
Signals
Methods
- Unit createFromWkid(int wkid)
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
Returns the Enums.UnitType type of this unit (read-only).
Signal Documentation
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.
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.
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.
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.
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.