UNPKG

@arcgis/map-components

Version:
86 lines (84 loc) 4.01 kB
/// <reference types="@arcgis/core/interfaces.d.ts" /> /// <reference types="../../index.d.ts" /> import { Use } from '@arcgis/lumina/controllers'; import { default as BasemapToggleViewModel } from '@arcgis/core/widgets/BasemapToggle/BasemapToggleViewModel.js'; import { JsxNode, PublicLitElement as LitElement, TargetedEvent } from '@arcgis/lumina'; import { ArcgisReferenceElement } from '../../utils/component-utils'; declare const useBasemapToggleViewModel: (component: LitElement & Pick<BasemapToggleViewModel, never> & import('../../controllers/useViewModel').ViewModelControllerUses<BasemapToggleViewModel>) => BasemapToggleViewModel; /** * The Basemap Toggle component allows an end-user to switch between two basemaps. * * The basemaps can have different spatial references. * * [Read more...](https://developers.arcgis.com/javascript/latest/references/map-components/arcgis-basemap-toggle/) */ export declare class ArcgisBasemapToggle extends LitElement { /** The map's current [basemap](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html#basemap). */ readonly activeBasemap: nullish | __esri.Basemap; /** * 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-basemap-toggle/#destroy) method when you are done to * prevent memory leaks. * * @default false */ autoDestroyDisabled: boolean; /** * 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 "layer-basemap" */ icon?: string; /** The component's default label. */ label?: string; /** * Replace localized message strings with your own strings. * * _**Note**: Individual message keys may change between releases._ */ messageOverrides?: typeof this.messages._overrides; /** The next basemap for toggling. */ nextBasemap?: __esri.BasemapProperties | string; /** @default "top-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; /** * Indicates if the Basemap title is displayed. * * @default false */ showTitle: boolean; /** * The current state of the component. * * @default "disabled" */ readonly state: "ready" | "loading" | "disabled" | "incompatible-next-basemap"; /** Permanently destroy the component. */ destroy(): Promise<void>; /** Toggles to the [next basemap](#nextBasemap). */ toggle(): Promise<any>; /** Emitted when the value of a property is changed. Use this to listen to changes to properties. */ readonly arcgisPropertyChange: TargetedEvent<this, { name: "state" | "activeBasemap" | "nextBasemap"; }>; /** Emitted when the component associated with a map or scene view is is ready to be interacted with. */ readonly arcgisReady: TargetedEvent<this, void>; private messages: Partial<{ componentLabel: string; incompatibleSpatialReference: string; }> & import('@arcgis/lumina/controllers').T9nMeta<{ componentLabel: string; incompatibleSpatialReference: string; }>; } export {};