UNPKG

@arcgis/map-components

Version:
87 lines (85 loc) 4.03 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 RouteLayer } from '@arcgis/core/layers/RouteLayer.js'; import { default as Directions } from '@arcgis/core/widgets/Directions.js'; import { PublicLitElement as LitElement, TargetedEvent } from '@arcgis/lumina'; import { PropertyValues } from 'lit'; import { ArcgisReferenceElement } from '../../utils/component-utils'; declare const useDirectionsWidget: (component: import('@arcgis/components-controllers').StencilLifecycles & { manager: import('@arcgis/components-controllers').ControllerManager; el: HTMLElement; autoDestroyDisabled?: boolean; destroy?: () => Promise<void>; } & Pick<Directions, never> & { reactiveUtils?: typeof __esri.reactiveUtils; state?: unknown; viewModel?: __esri.DirectionsViewModel | undefined; icon: Nil | string; label: Nil | string; referenceElement: ArcgisReferenceElement | Nil | string; position: __esri.UIPosition; arcgisReady: import('@arcgis/components-controllers').EventEmitter; arcgisPropertyChange: import('@arcgis/components-controllers').EventEmitter<{ name: string; }> | undefined; el: HTMLElement & { childElem?: HTMLElement & { ownedBy?: HTMLElement; }; view?: __esri.MapView | __esri.SceneView | Nil; }; autoDestroyDisabled: boolean; destroy: () => Promise<void>; }, options?: { editConstructorProperties(props: __esri.DirectionsProperties | undefined): __esri.DirectionsProperties | Promise<__esri.DirectionsProperties | undefined> | undefined; } | undefined) => Directions; /** Directions component provides a way to calculate directions, between two or more input locations with a [RouteLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-RouteLayer.html), using ArcGIS Online and custom Network Analysis Route services. */ export declare class ArcgisDirections extends LitElement { apiKey: string | 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 temporarily hide it. If this * is set, make sure to call the \`destroy\` method when you are done to prevent * memory leaks. */ autoDestroyDisabled: boolean; headingLevel: number; hideLayerDetails: boolean | undefined; hideSaveAsButton: boolean | undefined; hideSaveButton: boolean | undefined; /** * Icon which represents the component. * Typically used when the component is controlled by another component (e.g. by the Expand component). * Search [Calcite Icons](https://developers.arcgis.com/calcite-design-system/icons/) for possible values. */ icon: string; /** The component's default label. */ label: string; readonly lastRoute: nullish | __esri.DirectionsLastRoute; layer: nullish | RouteLayer; maxStops: number; position: __esri.UIPosition; referenceElement: ArcgisReferenceElement | Nil | string; routeLayerItemId?: string; searchProperties: nullish | __esri.DirectionsSearchProperties; readonly state: "ready" | "disabled" | "error" | "initializing" | "routing" | "unauthenticated"; unit: __esri.SystemOrLengthUnit; useDefaultRouteLayer: boolean; /** Permanently destroy the component */ destroy(): Promise<void>; getDirections(): Promise<__esri.RouteLayerSolveResult>; save(): Promise<__esri.PortalItem>; saveAs(portalItem: __esri.PortalItem, options: { folder: __esri.PortalFolder; }): Promise<__esri.PortalItem>; zoomToRoute(): Promise<void>; readonly arcgisPropertyChange: TargetedEvent<this, { name: "state" | "lastRoute"; }>; readonly arcgisReady: TargetedEvent<this, undefined>; } export {};