Constructors
-
new Format(properties)
-
Parameter:properties Objectoptional
See the properties for a list of all the properties that may be passed into the constructor.
Property Overview
Name | Type | Summary | Class | |
---|---|---|---|---|
ConversionInfo | Contains information that describes how this Format should be converted. more details | more details | Format | |
CoordinateSegment[] | A array of Coordinate Segments. more details | more details | Format | |
String | A string that serves as a pattern describing how this Format should be displayed. more details | more details | Format | |
String | The name of the class. more details | more details | Accessor | |
String | The default pattern describing how this Format should be displayed. more details | more details | Format | |
String | The name of the coordinate. more details | more details | Format | |
SpatialReference | The SpatialReference for this format. more details | more details | Format | |
CoordinateConversionViewModel | The view model of the CoordinateConversion widget that is utilizing this format. more details | more details | Format |
Property Details
-
conversionInfo ConversionInfo
-
Contains information that describes how this Format should be converted. This property should only be set when creating a custom Format.
- Default Value:null
-
coordinateSegments CoordinateSegment[]
-
A array of Coordinate Segments. Each segment represents a section of the Format's coordinate.
- Default Value:null
-
currentPattern String
-
A string that serves as a pattern describing how this Format should be displayed. The pattern should contain all of aliases specified by the Format's coordinateSegments property.
- Default Value:null
Example:// Remove the spaces from an mgrs coordinate var format = coordinateConversionWidget.formats.find(function(format) { return format.name === "mgrs"; }); console.log.(format.currentPattern); // > Z S X Y format.currentPattern = "ZSXY"
-
The name of the class. The declared class name is formatted as
esri.folder.className
.
-
defaultPattern String
-
The default pattern describing how this Format should be displayed. See currentPattern.
- Default Value:null
-
name String
-
The name of the coordinate. A CoordinateConversion widget should not contain multiple Formats with the same name.
- Default Value:null
-
spatialReference SpatialReference
-
The SpatialReference for this format. Coordinates generated for a format will be derived from points in this spatial reference.
-
viewModel CoordinateConversionViewModel
-
The view model of the CoordinateConversion widget that is utilizing this format.
Type Definitions
-
ConversionInfo
-
This object describes how a Format should be projected and formatted for display. Used to define custom Formats that require custom conversion and/or projection logic.
-
CoordinateSegment
-
A coordinate segment represents one piece of a coordinate string.
A MGRS coordinate, for example
30UVG898998
, is described by four segments:- Alias
Z
, the gridzone:30U
- Alias
S
, the 100,000 meter square designator:VG
- Alias
X
, the easting (x coordinate with respect to the 10,000 meter square):898
- Alias
Y
, the northing (y coordinate with respect to the 10,000 meter square):998
- Alias