@arcgis/map-components
Version:
ArcGIS Map Components
83 lines (81 loc) • 3.58 kB
TypeScript
/// <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 LocateViewModel } from '@arcgis/core/widgets/Locate/LocateViewModel.js';
import { JsxNode, PublicLitElement as LitElement, TargetedEvent } from '@arcgis/lumina';
import { ArcgisReferenceElement } from '../../utils/component-utils';
declare const useLocateViewModel: (component: import('@arcgis/components-controllers').StencilLifecycles & {
manager: import('@arcgis/components-controllers').ControllerManager;
el: HTMLElement;
autoDestroyDisabled?: boolean;
destroy?: () => Promise<void>;
} & Pick<LocateViewModel, never> & {
reactiveUtils?: typeof __esri.reactiveUtils;
state?: "ready" | "disabled" | "error" | "feature-unsupported" | "locating" | 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) => LocateViewModel;
/** Locate component animates the [View](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html) to the user's current location.
*/
export declare class ArcgisLocate extends LitElement {
private messages;
/**
* 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;
geolocationOptions: any;
/** @default false */
goToLocationDisabled: boolean;
goToOverride: nullish | __esri.GoToOverride;
graphic: __esri.Graphic;
icon: Nil | string;
/** The component's default label. */
label: Nil | string;
/** Replace localized message strings with your own strings. */
messageOverrides?: typeof this.messages._overrides;
/** @default false */
popupDisabled: boolean;
position: __esri.UIPosition;
referenceElement: ArcgisReferenceElement | Nil | string;
scale: number | nullish;
/**
* The current state of the component.
*/
readonly state: "ready" | "disabled" | "error" | "feature-unsupported" | "locating";
/**
* This function provides the ability to interrupt and cancel the process of
* programmatically obtaining the location of the user's device.
*/
cancelLocate(): Promise<void>;
/** Permanently destroy the component */
destroy(): Promise<void>;
locate(): Promise<GeolocationPosition | null>;
readonly arcgisError: TargetedEvent<this, __esri.LocateViewModelLocateErrorEvent>;
readonly arcgisPropertyChange: TargetedEvent<this, {
name: "state";
}>;
readonly arcgisReady: TargetedEvent<this, undefined>;
readonly arcgisSuccess: TargetedEvent<this, __esri.LocateLocateEvent>;
}
export {};