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
Property | Attribute | Type |
---|---|---|
auto-destroy-disabled | boolean | |
| ||
currentLocation readonly |
| |
| ||
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
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
conversions: Collection<Conversion>
A Collection containing every Conversion that the widget is currently displaying.
currentLocation
currentLocation: Point
Describes the location of the coordinates currently displayed by the widget as a Point.
formats
formats: Collection<Format>
A Collection containing every Format that the widget is capable of displaying.
headingLevel
headingLevel: number
Indicates the heading level to use for the coordinate input and coordinate settings headings.
- Attribute
- heading-level
- Default value
- 4
hideSettingsButton
hideSettingsButton: boolean
- Attribute
- hide-settings-button
- Default value
- false
icon
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"
locationSymbol
locationSymbol: CIMSymbol | PictureMarkerSymbol | PointSymbol3D | SimpleMarkerSymbol
This symbol is used to visualize the location currently described by the widget when capture
mode
is active.
mode
mode: "capture" | "live"
Describes the current mode of the widget.
- Attribute
- mode
- Default value
- "live"
multipleConversionsDisabled
multipleConversionsDisabled: boolean
If this property is set to false
, multiple conversions cannot be displayed.
- Attribute
- multiple-conversions-disabled
- Default value
- false
orientation
orientation: "auto" | "expand-down" | "expand-up"
Determines whether the widget should expand up or down.
- Attribute
- orientation
- Default value
- "auto"
position
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
referenceElement: ArcgisLinkChart | ArcgisMap | ArcgisScene | string
- Attribute
- reference-element
state
state: "disabled" | "loading" | "ready"
The view model's state.
- Attribute
- state
- Default value
- "disabled"
storageDisabled
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
storageType: "local" | "session"
This property determines whether sessionStorage or localStorage will be used to store widget state.
- Attribute
- storage-type
- Default value
- "session"
Methods
Method | Signature |
---|---|
componentOnReady(): Promise<void> | |
destroy(): Promise<void> | |
reverseConvert(coordinate: string, format: __esri.Format): Promise<__esri.Point | nullish> |
componentOnReady
componentOnReady(): Promise<void>
Create a promise that resolves once component is fully loaded.
- Returns
- Promise<void>
reverseConvert
reverseConvert(coordinate: string, format: __esri.Format): Promise<__esri.Point | nullish>
Parameters
Parameter | Type | Optional? |
---|---|---|
coordinate | string | |
format |
- Returns
- Promise<Point | null | undefined>
Events
Event | Type |
---|---|
{ name: "state" | "currentLocation"; } | |
undefined |
arcgisPropertyChange
arcgisPropertyChange: { name: "state" | "currentLocation"; }
Emitted when the value of a property is changed. Use this to listen to changes to properties.
Events triggered on this element will be propagated to their outermost elements.
The event is composable and will propagate across the shadow DOM into the standard DOM.
The event's default behavior can be canceled, allowing for custom behavior to be implemented instead.
arcgisReady
arcgisReady: undefined
Emitted when the component associated with a map view is is ready to be interacted with.
Events triggered on this element will be propagated to their outermost elements.
The event is composable and will propagate across the shadow DOM into the standard DOM.
The event's default behavior can be canceled, allowing for custom behavior to be implemented instead.