UNPKG

@arcgis/map-components

Version:
166 lines (164 loc) 8.13 kB
/// <reference types="@arcgis/core/interfaces.d.ts" /> /// <reference types="../../index.d.ts" /> import { Use } from '@arcgis/lumina/controllers'; import { default as CoordinateConversion } from '@arcgis/core/widgets/CoordinateConversion.js'; import { PublicLitElement as LitElement, TargetedEvent } from '@arcgis/lumina'; import { ArcgisReferenceElement } from '../../utils/component-utils'; declare const useCoordinateConversionWidget: (component: LitElement & Pick<CoordinateConversion, "icon" | "label" | "viewModel" | "orientation" | "mode" | "headingLevel" | "goToOverride" | "conversions" | "formats" | "locationSymbol" | "storageType"> & { state?: unknown; viewModel?: __esri.CoordinateConversionViewModel | undefined; closed?: boolean; icon: import('@arcgis/components-utils').Nil | string; label: import('@arcgis/components-utils').Nil | string; referenceElement?: ArcgisReferenceElement | string; position: __esri.UIPosition; arcgisReady: import('@arcgis/lumina').EventEmitter; arcgisPropertyChange: import('@arcgis/lumina').EventEmitter<{ name: string; }> | undefined; el: HTMLElement & { childElem?: HTMLElement & { ownedBy?: HTMLElement; }; view?: __esri.LinkChartView | __esri.MapView | __esri.SceneView; }; autoDestroyDisabled: boolean; destroy: () => Promise<void>; }) => CoordinateConversion; /** * The Coordinate Conversion 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](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html). * * [Read more...](https://developers.arcgis.com/javascript/latest/references/map-components/arcgis-coordinate-conversion/) */ export declare class ArcgisCoordinateConversion extends LitElement { /** * 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](https://developers.arcgis.com/javascript/latest/references/map-components/arcgis-coordinate-conversion/#destroy) method when you are done to * prevent memory leaks. * * @default false */ autoDestroyDisabled: boolean; /** * A [Collection](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html) containing every [Conversion](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-support-Conversion.html) * that the widget is currently displaying. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion.html#conversions) */ conversions: __esri.Collection<__esri.Conversion>; /** * Describes the location of the coordinates currently displayed by the widget as a [Point](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Point.html). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion.html#currentLocation) */ readonly currentLocation: nullish | __esri.Point; /** * A [Collection](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Collection.html) containing every [Format](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion-support-Format.html) * that the widget is capable of displaying. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion.html#formats) */ formats: __esri.Collection<__esri.Format>; /** * This function provides the ability to override either the * [MapView goTo()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#goTo) or * [SceneView goTo()](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html#goTo) methods. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion.html#goToOverride) * * @since 4.33 */ goToOverride: nullish | __esri.GoToOverride; /** * Indicates the heading level to use for the coordinate input and coordinate settings headings. * * @default 4 */ headingLevel: number; /** @default false */ hideCaptureButton: boolean | undefined; /** @default false */ hideInputButton: boolean | undefined; /** @default false */ hideExpandButton: boolean | undefined; /** @default false */ hideSettingsButton: boolean | undefined; /** * Icon which represents the component. * Typically used when the component is controlled by another component (e.g. by the Expand component). * * @see [Calcite Icons](https://developers.arcgis.com/calcite-design-system/icons/) * @default "coordinate-system" */ icon: string; /** * The widget's default label. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion.html#label) */ label: string; /** * This symbol is used to visualize the location currently described by the widget when `capture` mode * is active. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion.html#locationSymbol) */ locationSymbol: __esri.SimpleMarkerSymbol | __esri.PictureMarkerSymbol | __esri.PointSymbol3D | __esri.CIMSymbol; /** * Describes the current mode of the widget. * * @default "live" */ mode: "live" | "capture"; /** * If this property is set to `false`, multiple conversions cannot be displayed. * * @default false */ multipleConversionsDisabled: boolean; /** * Determines whether the widget should expand up or down. * * @default "auto" */ orientation: "auto" | "expand-up" | "expand-down"; /** @default "bottom-left" */ position: __esri.UIPosition; /** * By assigning the `id` attribute of the Map or Scene component to this property, you can position a child component anywhere in the DOM while still maintaining a connection to the Map or Scene. * * @see [Associate components with a Map or Scene component](https://developers.arcgis.com/javascript/latest/programming-patterns/#associate-components-with-a-map-or-scene-component) */ referenceElement?: ArcgisReferenceElement | string; /** * The current state of the component. * * @default "disabled" */ readonly state: "ready" | "loading" | "disabled"; /** * Unless this property is set to `false`, sessionStorage or localStorage (depending on [storageType](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-CoordinateConversion.html#storageType)) * will be used to hydrate and persist the Coordinate Conversion component's state. * * @default false */ storageDisabled: boolean; /** * This property determines whether sessionStorage or localStorage will be used to store widget state. * * @default "session" */ storageType: "local" | "session"; /** Permanently destroy the component. */ destroy(): Promise<void>; reverseConvert(coordinate: string, format: __esri.Format): Promise<__esri.Point | nullish>; /** Emitted when the value of a property is changed. Use this to listen to changes to properties. */ readonly arcgisPropertyChange: TargetedEvent<this, { name: "state" | "currentLocation"; }>; /** Emitted when the component associated with a map or scene view is is ready to be interacted with. */ readonly arcgisReady: TargetedEvent<this, void>; } export {};