Coordinate Conversion

Use dark colors for code blocksCopy
1
import "@arcgis/map-components/components/arcgis-coordinate-conversion";

CoordinateConversion component provides a way to display user cursor position either as map coordinates or as any of several popular coordinate notations. Additionally, the component provides a way to convert user input coordinates into a Point.

Demo

Properties

PropertyAttributeType
auto-destroy-disabled
boolean
heading-level
number
hide-capture-button
boolean
hide-edit-button
boolean
hide-expand-button
boolean
hide-settings-button
boolean
icon
string
label
string
mode
"capture" | "live"
multiple-conversions-disabled
boolean
orientation
"auto" | "expand-down" | "expand-up"
position
"bottom-leading" | "bottom-left" | "bottom-right" | "bottom-trailing" | "manual" | "top-leading" | "top-left" | "top-right" | "top-trailing"
reference-element
ArcgisLinkChart | ArcgisMap | ArcgisScene | string
state
readonly
state
"disabled" | "loading" | "ready"
storage-disabled
boolean
storage-type
"local" | "session"

autoDestroyDisabled

Property
autoDestroyDisabled: boolean

If true, the component will not be destroyed automatically when it is disconnected from the document. This is useful when you want to move the component to a different place on the page, or temporarily hide it. If this is set, make sure to call the `destroy` method when you are done to prevent memory leaks.

Attribute
auto-destroy-disabled
Default value
false

conversions

Property
conversions: Collection<Conversion>

A Collection containing every Conversion that the widget is currently displaying.

Read more...

currentLocation

readonlyProperty
currentLocation: Point

Describes the location of the coordinates currently displayed by the widget as a Point.

Read more...

formats

Property
formats: Collection<Format>

A Collection containing every Format that the widget is capable of displaying.

Read more...

headingLevel

Property
headingLevel: number

Indicates the heading level to use for the coordinate input and coordinate settings headings.

Read more...

Attribute
heading-level
Default value
4

hideCaptureButton

Property
hideCaptureButton: boolean
Attribute
hide-capture-button
Default value
false

hideEditButton

Property
hideEditButton: boolean
Attribute
hide-edit-button
Default value
false

hideExpandButton

Property
hideExpandButton: boolean
Attribute
hide-expand-button
Default value
false

hideSettingsButton

Property
hideSettingsButton: boolean
Attribute
hide-settings-button
Default value
false

icon

Property
icon: string

Icon which represents the component. Typically used when the component is controlled by another component (e.g. by the Expand component). Search Calcite Icons for possible values.

Attribute
icon
Default value
"coordinate-system"

label

Property
label: string

The component's default label.

Attribute
label

locationSymbol

Property

This symbol is used to visualize the location currently described by the widget when capture mode is active.

Read more...

mode

Property
mode: "capture" | "live"

Describes the current mode of the widget.

Read more...

Attribute
mode
Default value
"live"

multipleConversionsDisabled

Property
multipleConversionsDisabled: boolean

If this property is set to false, multiple conversions cannot be displayed.

Attribute
multiple-conversions-disabled
Default value
false

orientation

Property
orientation: "auto" | "expand-down" | "expand-up"

Determines whether the widget should expand up or down.

Read more...

Attribute
orientation
Default value
"auto"

position

Property
position: "bottom-leading" | "bottom-left" | "bottom-right" | "bottom-trailing" | "manual" | "top-leading" | "top-left" | "top-right" | "top-trailing"
Attribute
position
Default value
"bottom-left"

referenceElement

Property
referenceElement: ArcgisLinkChart | ArcgisMap | ArcgisScene | string
Attribute
reference-element

state

readonlyreflected

Attribute changes are reflected on the DOM.

Property
state: "disabled" | "loading" | "ready"

The view model's state.

Read more...

Attribute
state
Default value
"disabled"

storageDisabled

Property
storageDisabled: boolean

Unless this property is set to false, sessionStorage or localStorage (depending on storageType) will be used to hydrate and persist the CoordinateConversion widget's state.

Attribute
storage-disabled
Default value
false

storageType

Property
storageType: "local" | "session"

This property determines whether sessionStorage or localStorage will be used to store widget state.

Read more...

Attribute
storage-type
Default value
"session"

Methods

MethodSignature
componentOnReady(): Promise<void>
destroy(): Promise<void>
reverseConvert(coordinate: string, format: __esri.Format): Promise<__esri.Point | nullish>

componentOnReady

Method
componentOnReady(): Promise<void>

Create a promise that resolves once component is fully loaded.

Returns
Promise<void>

destroy

Method
destroy(): Promise<void>

Permanently destroy the component

Returns
Promise<void>

reverseConvert

Method
reverseConvert(coordinate: string, format: __esri.Format): Promise<__esri.Point | nullish>
Parameters
ParameterTypeOptional?
coordinate
string
format
Returns
Promise<Point | null | undefined>

Events

EventType
{ name: "state" | "currentLocation"; }
undefined

arcgisPropertyChange

Event
arcgisPropertyChange: { name: "state" | "currentLocation"; }

Fired when the value of a property is changed. Use this to listen to changes to properties.

bubbles

Events triggered on this element will be propagated to their outermost elements.

composed

The event is composable and will propagate across the shadow DOM into the standard DOM.

cancelable

The event's default behavior can be canceled, allowing for custom behavior to be implemented instead.

arcgisReady

Event
arcgisReady: undefined
bubbles

Events triggered on this element will be propagated to their outermost elements.

composed

The event is composable and will propagate across the shadow DOM into the standard DOM.

cancelable

The event's default behavior can be canceled, allowing for custom behavior to be implemented instead.

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