import Format from "@arcgis/core/widgets/CoordinateConversion/support/Format.js";const Format = await $arcgis.import("@arcgis/core/widgets/CoordinateConversion/support/Format.js");- Inheritance
- Format→
Accessor
- Since
- ArcGIS Maps SDK for JavaScript 4.7
The Format class represents one of the CoordinateConversion.formats in the Coordinate Conversion widget. Each format describes how a Point should be transformed into a coordinate for display purposes.
Constructors
Constructor
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| properties | | |
Properties
| Property | Type | Class |
|---|---|---|
| | ||
| CoordinateSegment[] | null | undefined | | |
| | ||
| readonly inherited | ||
| | ||
| | ||
| | ||
| | ||
| |
conversionInfo
- Type
- ConversionInfo | null | undefined
Contains information that describes how this Format should be converted. This property should only be set when creating a custom Format.
coordinateSegments
- Type
- CoordinateSegment[] | null | undefined
A array of Coordinate Segments. Each segment represents a section of the Format's coordinate.
currentPattern
- Type
- 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.
- Example
- // Remove the spaces from an mgrs coordinatelet format = coordinateConversionWidget.formats.find(function(format) {return format.name === "mgrs";});console.log.(format.currentPattern);// > Z S X Yformat.currentPattern = "ZSXY"
defaultPattern
The default pattern describing how this Format should be displayed. See currentPattern.
name
The name of the coordinate. A CoordinateConversion widget should not contain multiple Formats with the same name.
spatialReference
- Type
- SpatialReference
The SpatialReference for this format. Coordinates generated for a format will be derived from points in this spatial reference.
viewModel
- Type
- CoordinateConversionViewModel | null | undefined
The view model of the CoordinateConversion widget that is utilizing this format.