@arcgis/map-components
Version:
ArcGIS Map Components
101 lines (99 loc) • 4.14 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 TrackViewModel } from '@arcgis/core/widgets/Track/TrackViewModel.js';
import { JsxNode, PublicLitElement as LitElement, TargetedEvent } from '@arcgis/lumina';
import { ArcgisReferenceElement } from '../../utils/component-utils';
declare const useTrackViewModel: (component: import('@arcgis/components-controllers').StencilLifecycles & {
manager: import('@arcgis/components-controllers').ControllerManager;
el: HTMLElement;
autoDestroyDisabled?: boolean;
destroy?: () => Promise<void>;
} & Pick<TrackViewModel, never> & {
reactiveUtils?: typeof __esri.reactiveUtils;
state?: "ready" | "disabled" | "error" | "tracking" | "waiting" | "feature-unsupported" | 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) => TrackViewModel;
/**
* Track component is a button that animates the map or scene to the user's location when clicked.
* The view rotates based on device heading.
* The default heading symbol will display when speed is greater than zero and the browser provides heading information.
*
* **Known Limitations**
*
* - The heading symbol is not currently supported within an `arcgis-scene` component.
*/
export declare class ArcgisTrack extends LitElement {
private messages: Partial<{
componentLabel: string;
startTracking: string;
stopTracking: string;
permissionError: string;
timeoutError: string;
positionUnavailable: string;
}> & import('@arcgis/components-controllers').T9nMeta<{
componentLabel: string;
startTracking: string;
stopTracking: string;
permissionError: string;
timeoutError: string;
positionUnavailable: string;
}>;
/**
* 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;
error: any;
geolocationOptions: any;
goToOverride: nullish | __esri.GoToOverride;
/** @default false */
goToLocationDisabled: boolean;
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;
position: __esri.UIPosition;
positionFilterFunction: Function | nullish;
referenceElement: ArcgisReferenceElement | Nil | string;
scale: number | nullish;
/**
* The current state of the component.
*/
readonly state: "ready" | "disabled" | "error" | "tracking" | "waiting" | "feature-unsupported";
readonly tracking: boolean;
/** Permanently destroy the component */
destroy(): Promise<void>;
start(): Promise<void>;
stop(): Promise<void>;
readonly arcgisComplete: TargetedEvent<this, __esri.TrackViewModelTrackEvent>;
readonly arcgisError: TargetedEvent<this, __esri.TrackViewModelTrackErrorEvent>;
readonly arcgisPropertyChange: TargetedEvent<this, {
name: "state";
}>;
readonly arcgisReady: TargetedEvent<this, undefined>;
}
export {};