UNPKG

@arcgis/map-components

Version:
84 lines (82 loc) 3.57 kB
/// <reference types="@arcgis/core/interfaces.d.ts" /> /// <reference types="../../index.d.ts" /> import { Use } from '@arcgis/components-controllers'; import { Nil } from '@arcgis/components-utils'; 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: import('@arcgis/components-controllers').StencilLifecycles & { manager: import('@arcgis/components-controllers').ControllerManager; el: HTMLElement; autoDestroyDisabled?: boolean; destroy?: () => Promise<void>; } & Pick<BasemapToggleViewModel, never> & { reactiveUtils?: typeof __esri.reactiveUtils; state?: "ready" | "loading" | "disabled" | "incompatible-next-basemap" | undefined; icon: Nil | string; label: Nil | string; referenceElement: ArcgisReferenceElement | Nil | string; arcgisReady: import('@arcgis/components-controllers').EventEmitter; position: __esri.UIPosition; arcgisPropertyChange: import('@arcgis/components-controllers').EventEmitter<{ name: string; }> | undefined; el: HTMLElement & { childElem?: HTMLElement & { ownedBy?: HTMLElement; }; view?: __esri.MapView | __esri.SceneView | undefined; }; autoDestroyDisabled: boolean; destroy: () => Promise<void>; }, options?: { editConstructorProperties(props: unknown): unknown; } | undefined) => BasemapToggleViewModel; /** * Basemap Toggle component allows an end-user to switch between two basemaps. * * The basemaps can have different spatial references. */ export declare class ArcgisBasemapToggle extends LitElement { private messages; /** * The map's current [basemap](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html#basemap). */ readonly activeBasemap: __esri.Basemap | nullish; /** * 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 * temporary hide it. If this is set, make sure to call the * \`destroy\` method when you are done to prevent memory leaks. */ autoDestroyDisabled: boolean; /** * Icon which represents the component. * Typically used when the component is controlled by another component (e.g. by the Expand component). */ icon: Nil | string; /** The component's default label. */ label: string | undefined; /** Replace localized message strings with your own strings. */ messageOverrides?: typeof this.messages._overrides; /** The next basemap for toggling. */ nextBasemap: __esri.Basemap | nullish; position: __esri.UIPosition; referenceElement: ArcgisReferenceElement | Nil | string; /** Indicates if the Basemap title is displayed. */ showTitle: boolean; /** * The current state of the component. */ readonly state: "ready" | "loading" | "disabled" | "incompatible-next-basemap"; /** Permanently destroy the component */ destroy(): Promise<void>; /** Toggles to the [next basemap](#nextBasemap). */ toggle(): Promise<any>; readonly arcgisPropertyChange: TargetedEvent<this, { name: "state" | "nextBasemap"; }>; readonly arcgisReady: TargetedEvent<this, undefined>; } export {};