UNPKG

@types/arcgis-js-api

Version:

TypeScript definitions for ArcGIS API for JavaScript

1,201 lines (974 loc) 3.6 MB
// Type definitions for ArcGIS API for JavaScript 4.18 // Project: http://js.arcgis.com // Definitions by: Esri <https://github.com/Esri> // Bjorn Svensson <https://github.com/bsvensson> // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.7 type HashMap<T> = Record<string, T>; type IPromise<T> = Promise<T>; interface IHandle { remove(): void; } declare namespace __esri { export class Accessor { constructor(obj?: any); destroyed: boolean; initialized: boolean; declaredClass: string; destroy(): void; get<T>(propertyName: string): T; get(propertyName: string): any; set<T>(propertyName: string, value: T): this; set(props: HashMap<any>): this; watch(path: string | string[], callback: WatchCallback, sync?: boolean): WatchHandle; protected notifyChange(propertyName: string): void; protected _get(propertyName: string): any; protected _get<T>(propertyName: string): T; protected _set<T>(propertyName: string, value: T): this; } export interface AnonymousAccessor extends Object { get?<T>(propertyName: string): T; get?(propertyName: string): any; set?<T>(propertyName: string, value: T): this; set?(props: HashMap<any>): this; watch?(path: string | string[], callback: WatchCallback, sync?: boolean): WatchHandle; } export type ItemCallback<T> = (item: T, index: number) => void; export type ItemCompareCallback<T> = (firstItem: T, secondItem: T) => number; export type ItemMapCallback<T, R> = (item: T, index: number) => R; export type ItemReduceCallback<T, R> = (previousValue: R, currentValue: T, index: number) => R; export type ItemTestCallback<T> = (item: T, index: number) => boolean; export type CollectionAfterAddEventHandler<T> = (event: CollectionAfterEvent<T>) => void; export type CollectionAfterChangesEventHandler<T> = (event: CollectionAfterChangesEvent<T>) => void; export type CollectionAfterRemoveEventHandler<T> = (event: CollectionAfterEvent<T>) => void; export type CollectionChangeEventHandler<T> = (event: CollectionChangeEvent<T>) => void; export type CollectionBeforeAddEventHandler<T> = (event: CollectionBeforeEvent<T>) => void; export type CollectionBeforeChangesEventHandler<T> = (event: CollectionBeforeEvent<T>) => void; export type CollectionBeforeRemoveEventHandler<T> = (event: CollectionBeforeEvent<T>) => void; export interface CollectionAfterEvent<T = any> { item: T; } export interface CollectionAfterChangesEvent<T = any> {} export interface CollectionBeforeEvent<T = any> { item: T; preventDefault(): void; } export interface CollectionChangeEvent<T = any> { added: T[]; removed: T[]; moved: T[]; } interface Collection<T = any> extends Evented { on(type: "after-add", listener: CollectionAfterAddEventHandler<T>): IHandle; on(type: "after-changes", listener: CollectionAfterChangesEventHandler<T>): IHandle; on(type: "after-remove", listener: CollectionAfterRemoveEventHandler<T>): IHandle; on(type: "before-add", listener: CollectionBeforeAddEventHandler<T>): IHandle; on(type: "before-changes", listener: CollectionBeforeChangesEventHandler<T>): IHandle; on(type: "before-remove", listener: CollectionBeforeRemoveEventHandler<T>): IHandle; on(type: "change", listener: CollectionChangeEventHandler<T>): IHandle; on(type: string, listener: (event: any) => void): IHandle; } type Constructor<T> = new (...params: any[]) => T; interface Types<T extends Base, Base = T> { key: string | ((obj: any) => string); base: Constructor<Base> | Function; typeMap: HashMap<Constructor<T>>; } export class Collection<T = any> extends Accessor { constructor(values?: any[] | Collection<any>); readonly length: number; add(item: T, index?: number): void; addMany(items: T[] | Collection<T>, index?: number): void; clone(): Collection<T>; concat(value: T[] | Collection<T>): Collection<T>; every(callback: ItemTestCallback<T>): boolean; filter(callback: ItemTestCallback<T>): Collection<T>; filter<S extends T>(callback: (item: T, index: number) => item is S): Collection<S>; find(callback: ItemTestCallback<T>): T; findIndex(callback: ItemTestCallback<T>): number; flatten(callback: (item: T, index: number) => T[] | Collection<T>): Collection<T>; flatten<U>(callback: (item: U, index: number) => U[] | Collection<U>): Collection<U>; forEach(callback: ItemCallback<T>): void; getItemAt(index: number): T; includes(searchElement: T): boolean; indexOf(searchElement: T, fromIndex?: number): number; join(separator?: string): string; lastIndexOf(searchElement: T, fromIndex?: number): number; map<R = T>(callback: ItemMapCallback<T, R>): Collection<R>; pop(): T; push(item: T): number; reduce<R = T>(callback: ItemReduceCallback<T, R>, initialValue?: R): R; reduceRight<R = T>(callback: ItemReduceCallback<T, R>, initialValue?: R): R; remove(item: T): void; removeAll(): void; removeAt(index: number): any; removeMany(items: T[] | Collection<T>): T[]; reorder(item: T, index: number): T; reverse(): Collection<T>; shift(): T; slice(begin?: number, end?: number): Collection<T>; some(callback: ItemCallback<T>): boolean; sort(compareFunction?: ItemCompareCallback<T>): void; splice(start: number, deleteCount: number, ...items: T[]): T[]; toArray(): T[]; unshift(...items: T[]): number; static isCollection<T = any>(value: any | Collection<T>): value is Collection<T>; static ofType<T extends Base, Base = T>( type: Constructor<T> | Types<T, Base> ): new (items?: (T[] | Collection<T>) | { items?: T[] | Collection<T> }) => Collection<T>; } type CollectionProperties<T = any> = T[] | Collection<T>; interface CollectionPropertiesBase<T = any> { items?: T[]; } type DateProperties = number | string | Date; export type BaseDynamicLayerLayerviewCreateErrorEventHandler = ( event: BaseDynamicLayerLayerviewCreateErrorEvent ) => void; export type BaseDynamicLayerLayerviewCreateEventHandler = (event: BaseDynamicLayerLayerviewCreateEvent) => void; export type BaseDynamicLayerLayerviewDestroyEventHandler = (event: BaseDynamicLayerLayerviewDestroyEvent) => void; export type BaseElevationLayerLayerviewCreateErrorEventHandler = ( event: BaseElevationLayerLayerviewCreateErrorEvent ) => void; export type BaseElevationLayerLayerviewCreateEventHandler = (event: BaseElevationLayerLayerviewCreateEvent) => void; export type BaseElevationLayerLayerviewDestroyEventHandler = (event: BaseElevationLayerLayerviewDestroyEvent) => void; export type BasemapLayerListTriggerActionEventHandler = (event: BasemapLayerListTriggerActionEvent) => void; export type BasemapToggleToggleEventHandler = (event: BasemapToggleToggleEvent) => void; export type BaseTileLayerLayerviewCreateErrorEventHandler = (event: BaseTileLayerLayerviewCreateErrorEvent) => void; export type BaseTileLayerLayerviewCreateEventHandler = (event: BaseTileLayerLayerviewCreateEvent) => void; export type BaseTileLayerLayerviewDestroyEventHandler = (event: BaseTileLayerLayerviewDestroyEvent) => void; export type BingMapsLayerLayerviewCreateErrorEventHandler = (event: BingMapsLayerLayerviewCreateErrorEvent) => void; export type BingMapsLayerLayerviewCreateEventHandler = (event: BingMapsLayerLayerviewCreateEvent) => void; export type BingMapsLayerLayerviewDestroyEventHandler = (event: BingMapsLayerLayerviewDestroyEvent) => void; export type BookmarksBookmarkEditEventHandler = (event: BookmarksBookmarkEditEvent) => void; export type BookmarksBookmarkSelectEventHandler = (event: BookmarksBookmarkSelectEvent) => void; export type BookmarksSelectBookmarkEventHandler = (event: BookmarksSelectBookmarkEvent) => void; export type BuildingSceneLayerLayerviewCreateErrorEventHandler = ( event: BuildingSceneLayerLayerviewCreateErrorEvent ) => void; export type BuildingSceneLayerLayerviewCreateEventHandler = (event: BuildingSceneLayerLayerviewCreateEvent) => void; export type BuildingSceneLayerLayerviewDestroyEventHandler = (event: BuildingSceneLayerLayerviewDestroyEvent) => void; export type ClassedColorSliderMaxChangeEventHandler = (event: ClassedColorSliderMaxChangeEvent) => void; export type ClassedColorSliderMinChangeEventHandler = (event: ClassedColorSliderMinChangeEvent) => void; export type ClassedColorSliderThumbChangeEventHandler = (event: ClassedColorSliderThumbChangeEvent) => void; export type ClassedColorSliderThumbDragEventHandler = (event: ClassedColorSliderThumbDragEvent) => void; export type ClassedColorSliderViewModelMaxChangeEventHandler = ( event: ClassedColorSliderViewModelMaxChangeEvent ) => void; export type ClassedColorSliderViewModelMinChangeEventHandler = ( event: ClassedColorSliderViewModelMinChangeEvent ) => void; export type ClassedSizeSliderMaxChangeEventHandler = (event: ClassedSizeSliderMaxChangeEvent) => void; export type ClassedSizeSliderMinChangeEventHandler = (event: ClassedSizeSliderMinChangeEvent) => void; export type ClassedSizeSliderThumbChangeEventHandler = (event: ClassedSizeSliderThumbChangeEvent) => void; export type ClassedSizeSliderThumbDragEventHandler = (event: ClassedSizeSliderThumbDragEvent) => void; export type ClassedSizeSliderViewModelMaxChangeEventHandler = ( event: ClassedSizeSliderViewModelMaxChangeEvent ) => void; export type ClassedSizeSliderViewModelMinChangeEventHandler = ( event: ClassedSizeSliderViewModelMinChangeEvent ) => void; export type ColorSizeSliderMaxChangeEventHandler = (event: ColorSizeSliderMaxChangeEvent) => void; export type ColorSizeSliderMinChangeEventHandler = (event: ColorSizeSliderMinChangeEvent) => void; export type ColorSizeSliderThumbChangeEventHandler = (event: ColorSizeSliderThumbChangeEvent) => void; export type ColorSizeSliderThumbDragEventHandler = (event: ColorSizeSliderThumbDragEvent) => void; export type ColorSizeSliderViewModelMaxChangeEventHandler = (event: ColorSizeSliderViewModelMaxChangeEvent) => void; export type ColorSizeSliderViewModelMinChangeEventHandler = (event: ColorSizeSliderViewModelMinChangeEvent) => void; export type ColorSliderMaxChangeEventHandler = (event: ColorSliderMaxChangeEvent) => void; export type ColorSliderMinChangeEventHandler = (event: ColorSliderMinChangeEvent) => void; export type ColorSliderThumbChangeEventHandler = (event: ColorSliderThumbChangeEvent) => void; export type ColorSliderThumbDragEventHandler = (event: ColorSliderThumbDragEvent) => void; export type ColorSliderViewModelMaxChangeEventHandler = (event: ColorSliderViewModelMaxChangeEvent) => void; export type ColorSliderViewModelMinChangeEventHandler = (event: ColorSliderViewModelMinChangeEvent) => void; export type CredentialDestroyEventHandler = (event: CredentialDestroyEvent) => void; export type CredentialTokenChangeEventHandler = (event: CredentialTokenChangeEvent) => void; export type CSVLayerLayerviewCreateErrorEventHandler = (event: CSVLayerLayerviewCreateErrorEvent) => void; export type CSVLayerLayerviewCreateEventHandler = (event: CSVLayerLayerviewCreateEvent) => void; export type CSVLayerLayerviewDestroyEventHandler = (event: CSVLayerLayerviewDestroyEvent) => void; export type ElevationLayerLayerviewCreateErrorEventHandler = (event: ElevationLayerLayerviewCreateErrorEvent) => void; export type ElevationLayerLayerviewCreateEventHandler = (event: ElevationLayerLayerviewCreateEvent) => void; export type ElevationLayerLayerviewDestroyEventHandler = (event: ElevationLayerLayerviewDestroyEvent) => void; export type ElevationSamplerChangedEventHandler = (event: ElevationSamplerChangedEvent) => void; export type FeatureFormSubmitEventHandler = (event: FeatureFormSubmitEvent) => void; export type FeatureFormValueChangeEventHandler = (event: FeatureFormValueChangeEvent) => void; export type FeatureFormViewModelSubmitEventHandler = (event: FeatureFormViewModelSubmitEvent) => void; export type FeatureFormViewModelValueChangeEventHandler = (event: FeatureFormViewModelValueChangeEvent) => void; export type FeatureLayerEditsEventHandler = (event: FeatureLayerEditsEvent) => void; export type FeatureLayerLayerviewCreateErrorEventHandler = (event: FeatureLayerLayerviewCreateErrorEvent) => void; export type FeatureLayerLayerviewCreateEventHandler = (event: FeatureLayerLayerviewCreateEvent) => void; export type FeatureLayerLayerviewDestroyEventHandler = (event: FeatureLayerLayerviewDestroyEvent) => void; export type FeatureTableSelectionChangeEventHandler = (event: FeatureTableSelectionChangeEvent) => void; export type FeatureTemplatesSelectEventHandler = (event: FeatureTemplatesSelectEvent) => void; export type FeatureTemplatesViewModelSelectEventHandler = (event: FeatureTemplatesViewModelSelectEvent) => void; export type GeoJSONLayerEditsEventHandler = (event: GeoJSONLayerEditsEvent) => void; export type GeoJSONLayerLayerviewCreateErrorEventHandler = (event: GeoJSONLayerLayerviewCreateErrorEvent) => void; export type GeoJSONLayerLayerviewCreateEventHandler = (event: GeoJSONLayerLayerviewCreateEvent) => void; export type GeoJSONLayerLayerviewDestroyEventHandler = (event: GeoJSONLayerLayerviewDestroyEvent) => void; export type GeoRSSLayerLayerviewCreateErrorEventHandler = (event: GeoRSSLayerLayerviewCreateErrorEvent) => void; export type GeoRSSLayerLayerviewCreateEventHandler = (event: GeoRSSLayerLayerviewCreateEvent) => void; export type GeoRSSLayerLayerviewDestroyEventHandler = (event: GeoRSSLayerLayerviewDestroyEvent) => void; export type GraphicsLayerLayerviewCreateErrorEventHandler = (event: GraphicsLayerLayerviewCreateErrorEvent) => void; export type GraphicsLayerLayerviewCreateEventHandler = (event: GraphicsLayerLayerviewCreateEvent) => void; export type GraphicsLayerLayerviewDestroyEventHandler = (event: GraphicsLayerLayerviewDestroyEvent) => void; export type GroupLayerLayerviewCreateErrorEventHandler = (event: GroupLayerLayerviewCreateErrorEvent) => void; export type GroupLayerLayerviewCreateEventHandler = (event: GroupLayerLayerviewCreateEvent) => void; export type GroupLayerLayerviewDestroyEventHandler = (event: GroupLayerLayerviewDestroyEvent) => void; export type HeatmapSliderThumbChangeEventHandler = (event: HeatmapSliderThumbChangeEvent) => void; export type HeatmapSliderThumbDragEventHandler = (event: HeatmapSliderThumbDragEvent) => void; export type HeatmapSliderViewModelMaxChangeEventHandler = (event: HeatmapSliderViewModelMaxChangeEvent) => void; export type HeatmapSliderViewModelMinChangeEventHandler = (event: HeatmapSliderViewModelMinChangeEvent) => void; export type HistogramRangeSliderMaxChangeEventHandler = (event: HistogramRangeSliderMaxChangeEvent) => void; export type HistogramRangeSliderMinChangeEventHandler = (event: HistogramRangeSliderMinChangeEvent) => void; export type HistogramRangeSliderSegmentDragEventHandler = (event: HistogramRangeSliderSegmentDragEvent) => void; export type HistogramRangeSliderThumbChangeEventHandler = (event: HistogramRangeSliderThumbChangeEvent) => void; export type HistogramRangeSliderThumbDragEventHandler = (event: HistogramRangeSliderThumbDragEvent) => void; export type HistogramRangeSliderViewModelMaxChangeEventHandler = ( event: HistogramRangeSliderViewModelMaxChangeEvent ) => void; export type HistogramRangeSliderViewModelMinChangeEventHandler = ( event: HistogramRangeSliderViewModelMinChangeEvent ) => void; export type HomeGoEventHandler = (event: HomeGoEvent) => void; export type HomeViewModelGoEventHandler = (event: HomeViewModelGoEvent) => void; export type IdentityManagerCredentialCreateEventHandler = (event: IdentityManagerCredentialCreateEvent) => void; export type IdentityManagerDialogCreateEventHandler = (event: IdentityManagerDialogCreateEvent) => void; export type ImageryLayerLayerviewCreateErrorEventHandler = (event: ImageryLayerLayerviewCreateErrorEvent) => void; export type ImageryLayerLayerviewCreateEventHandler = (event: ImageryLayerLayerviewCreateEvent) => void; export type ImageryLayerLayerviewDestroyEventHandler = (event: ImageryLayerLayerviewDestroyEvent) => void; export type ImageryTileLayerLayerviewCreateErrorEventHandler = ( event: ImageryTileLayerLayerviewCreateErrorEvent ) => void; export type ImageryTileLayerLayerviewCreateEventHandler = (event: ImageryTileLayerLayerviewCreateEvent) => void; export type ImageryTileLayerLayerviewDestroyEventHandler = (event: ImageryTileLayerLayerviewDestroyEvent) => void; export type IntegratedMeshLayerLayerviewCreateErrorEventHandler = ( event: IntegratedMeshLayerLayerviewCreateErrorEvent ) => void; export type IntegratedMeshLayerLayerviewCreateEventHandler = (event: IntegratedMeshLayerLayerviewCreateEvent) => void; export type IntegratedMeshLayerLayerviewDestroyEventHandler = ( event: IntegratedMeshLayerLayerviewDestroyEvent ) => void; export type KMLLayerLayerviewCreateErrorEventHandler = (event: KMLLayerLayerviewCreateErrorEvent) => void; export type KMLLayerLayerviewCreateEventHandler = (event: KMLLayerLayerviewCreateEvent) => void; export type KMLLayerLayerviewDestroyEventHandler = (event: KMLLayerLayerviewDestroyEvent) => void; export type LayerLayerviewCreateErrorEventHandler = (event: LayerLayerviewCreateErrorEvent) => void; export type LayerLayerviewCreateEventHandler = (event: LayerLayerviewCreateEvent) => void; export type LayerLayerviewDestroyEventHandler = (event: LayerLayerviewDestroyEvent) => void; export type LayerListTriggerActionEventHandler = (event: LayerListTriggerActionEvent) => void; export type LayerListViewModelTriggerActionEventHandler = (event: LayerListViewModelTriggerActionEvent) => void; export type LocateLocateErrorEventHandler = (event: LocateLocateErrorEvent) => void; export type LocateLocateEventHandler = (event: LocateLocateEvent) => void; export type LocateViewModelLocateErrorEventHandler = (event: LocateViewModelLocateErrorEvent) => void; export type MapImageLayerLayerviewCreateErrorEventHandler = (event: MapImageLayerLayerviewCreateErrorEvent) => void; export type MapImageLayerLayerviewCreateEventHandler = (event: MapImageLayerLayerviewCreateEvent) => void; export type MapImageLayerLayerviewDestroyEventHandler = (event: MapImageLayerLayerviewDestroyEvent) => void; export type MapNotesLayerLayerviewCreateErrorEventHandler = (event: MapNotesLayerLayerviewCreateErrorEvent) => void; export type MapNotesLayerLayerviewCreateEventHandler = (event: MapNotesLayerLayerviewCreateEvent) => void; export type MapNotesLayerLayerviewDestroyEventHandler = (event: MapNotesLayerLayerviewDestroyEvent) => void; export type MapViewBlurEventHandler = (event: MapViewBlurEvent) => void; export type MapViewClickEventHandler = (event: MapViewClickEvent) => void; export type MapViewDoubleClickEventHandler = (event: MapViewDoubleClickEvent) => void; export type MapViewDragEventHandler = (event: MapViewDragEvent) => void; export type MapViewFocusEventHandler = (event: MapViewFocusEvent) => void; export type MapViewHoldEventHandler = (event: MapViewHoldEvent) => void; export type MapViewImmediateClickEventHandler = (event: MapViewImmediateClickEvent) => void; export type MapViewImmediateDoubleClickEventHandler = (event: MapViewImmediateDoubleClickEvent) => void; export type MapViewKeyDownEventHandler = (event: MapViewKeyDownEvent) => void; export type MapViewKeyUpEventHandler = (event: MapViewKeyUpEvent) => void; export type MapViewLayerviewCreateErrorEventHandler = (event: MapViewLayerviewCreateErrorEvent) => void; export type MapViewLayerviewCreateEventHandler = (event: MapViewLayerviewCreateEvent) => void; export type MapViewLayerviewDestroyEventHandler = (event: MapViewLayerviewDestroyEvent) => void; export type MapViewMouseWheelEventHandler = (event: MapViewMouseWheelEvent) => void; export type MapViewPointerDownEventHandler = (event: MapViewPointerDownEvent) => void; export type MapViewPointerEnterEventHandler = (event: MapViewPointerEnterEvent) => void; export type MapViewPointerLeaveEventHandler = (event: MapViewPointerLeaveEvent) => void; export type MapViewPointerMoveEventHandler = (event: MapViewPointerMoveEvent) => void; export type MapViewPointerUpEventHandler = (event: MapViewPointerUpEvent) => void; export type MapViewResizeEventHandler = (event: MapViewResizeEvent) => void; interface Basemap extends Accessor, Loadable, JSONSupport { /** * A collection of tile layers that make up the basemap's features. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-Basemap.html#baseLayers) */ baseLayers: Collection<Layer>; /** * An identifier used to refer to the basemap when referencing it elsewhere. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-Basemap.html#id) */ id: string; /** * Indicates whether the basemap instance has loaded. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-Basemap.html#loaded) */ readonly loaded: boolean; /** * The portal item. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-Basemap.html#portalItem) */ portalItem: PortalItem; /** * A collection of tiled reference layers for displaying labels. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-Basemap.html#referenceLayers) */ referenceLayers: Collection<Layer>; /** * The spatial reference of the Basemap. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-Basemap.html#spatialReference) */ spatialReference: SpatialReference; /** * The URL pointing to an image that represents the basemap. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-Basemap.html#thumbnailUrl) */ thumbnailUrl: string; /** * The title of the basemap. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-Basemap.html#title) */ title: string; /** * Creates a deep clone of this object. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-Basemap.html#clone) */ clone(): Basemap; /** * Destroys the basemap, and any associated resources, including its [layers](https://developers.arcgis.com/javascript/latest/api-reference/esri-Basemap.html#layers) and [portalItem](https://developers.arcgis.com/javascript/latest/api-reference/esri-Basemap.html#portalItem). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-Basemap.html#destroy) */ destroy(): void; /** * Loads all the externally loadable resources associated with the basemap. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-Basemap.html#loadAll) */ loadAll(): Promise<Basemap>; } interface BasemapConstructor { /** * Creates a new basemap object. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-Basemap.html) */ new (properties?: BasemapProperties): Basemap; /** * Creates a new basemap instance from a [well known basemap ID](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html#basemap). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-Basemap.html#fromId) */ fromId(id: string): Basemap; fromJSON(json: any): Basemap; } export const Basemap: BasemapConstructor; interface BasemapProperties extends LoadableProperties { /** * A collection of tile layers that make up the basemap's features. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-Basemap.html#baseLayers) */ baseLayers?: CollectionProperties<LayerProperties>; /** * An identifier used to refer to the basemap when referencing it elsewhere. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-Basemap.html#id) */ id?: string; /** * The portal item. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-Basemap.html#portalItem) */ portalItem?: PortalItemProperties; /** * A collection of tiled reference layers for displaying labels. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-Basemap.html#referenceLayers) */ referenceLayers?: CollectionProperties<LayerProperties>; /** * The spatial reference of the Basemap. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-Basemap.html#spatialReference) */ spatialReference?: SpatialReferenceProperties; /** * The URL pointing to an image that represents the basemap. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-Basemap.html#thumbnailUrl) */ thumbnailUrl?: string; /** * The title of the basemap. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-Basemap.html#title) */ title?: string; } interface Camera extends Accessor, JSONSupport { /** * The diagonal field of view (fov) angle for the camera. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-Camera.html#fov) */ fov: number; /** * The compass heading of the camera in degrees. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-Camera.html#heading) */ heading: number; /** * The position of the camera defined by a map point. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-Camera.html#position) */ position: Point; /** * The tilt of the camera in degrees with respect to the surface as projected down from the camera position. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-Camera.html#tilt) */ tilt: number; /** * Creates a deep clone of the camera object. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-Camera.html#clone) */ clone(): Camera; } interface CameraConstructor { /** * The camera defines the [position](https://developers.arcgis.com/javascript/latest/api-reference/esri-Camera.html#position), [tilt](https://developers.arcgis.com/javascript/latest/api-reference/esri-Camera.html#tilt), and [heading](https://developers.arcgis.com/javascript/latest/api-reference/esri-Camera.html#heading) of the point from which the [SceneView's](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html) visible extent is observed. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-Camera.html) */ new (properties?: CameraProperties): Camera; fromJSON(json: any): Camera; } export const Camera: CameraConstructor; interface CameraProperties { /** * The diagonal field of view (fov) angle for the camera. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-Camera.html#fov) */ fov?: number; /** * The compass heading of the camera in degrees. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-Camera.html#heading) */ heading?: number; /** * The position of the camera defined by a map point. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-Camera.html#position) */ position?: PointProperties; /** * The tilt of the camera in degrees with respect to the surface as projected down from the camera position. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-Camera.html#tilt) */ tilt?: number; } interface Color { /** * The alpha value. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-Color.html#a) */ a: number; /** * The blue value. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-Color.html#b) */ b: number; /** * The green value. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-Color.html#g) */ g: number; /** * The red value. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-Color.html#r) */ r: number; /** * Creates a deep clone of the Color instance. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-Color.html#clone) */ clone(): Color; /** * Takes an array of rgb(a) values, named string, hex string or an hsl(a) string, an object with `r`, `g`, `b`, and `a` properties, or a [Color](https://developers.arcgis.com/javascript/latest/api-reference/esri-Color.html) object and sets this color instance to the input value. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-Color.html#setColor) */ setColor(color: string | number[] | any): Color; /** * Returns a CSS color string in rgba form representing the Color instance. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-Color.html#toCss) */ toCss(includeAlpha?: boolean): string; /** * Returns a CSS color string in hexadecimal form that represents the Color instance. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-Color.html#toHex) */ toHex(): string; /** * Returns a JSON object with all the values from a Color instance. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-Color.html#toJSON) */ toJSON(): any; /** * Returns a 3-component array of rgb values that represent the Color instance. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-Color.html#toRgb) */ toRgb(): number[]; /** * Returns a 4-component array of rgba values that represent the Color instance. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-Color.html#toRgba) */ toRgba(): number[]; } interface ColorConstructor { /** * Creates a new color object by passing either a hex, rgb(a), hsl(a) or [named color value](https://www.w3.org/wiki/CSS/Properties/color/keywords). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-Color.html) */ /** * Creates a Color instance by blending two colors using a weight factor. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-Color.html#blendColors) */ blendColors(start: Color, end: Color, weight: number, out?: Color): Color; new (color: string | number[] | any): Color; /** * Creates a Color instance using a 3 or 4 element array, mapping each element in sequence to the rgb(a) values of the color. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-Color.html#fromArray) */ fromArray(a: number[], obj?: Color): Color; /** * Creates a Color instance from a hex string with a '#' prefix. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-Color.html#fromHex) */ fromHex(color: string, obj?: Color): Color; /** * Creates a new Color instance, and initializes it with values from a JSON object. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-Color.html#fromJSON) */ fromJSON(json: any): Color; /** * Creates a Color instance from a string of the form "rgb()" or "rgba()". * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-Color.html#fromRgb) */ fromRgb(color: string, out?: Color): Color; /** * Creates a Color instance by parsing a generic string. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-Color.html#fromString) */ fromString(str: string, obj?: Color): Color; } export const Color: ColorConstructor; /** * Configure global properties of the library. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-config.html) */ interface config { apiKey: string; /** * This is used by the `@arcgis/core` and `arcgis-js-api` NPM packages. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-config.html#assetsPath) */ assetsPath: string; /** * The URL for font resources used by the [Font](https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-Font.html#family) class in [FeatureLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html) and [CSVLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-CSVLayer.html) labels. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-config.html#fontsUrl) */ fontsUrl: string; /** * The default [GeometryService](https://developers.arcgis.com/javascript/latest/api-reference/esri-tasks-GeometryService.html) used by widgets and other operations, such as on-the-fly projections. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-config.html#geometryServiceUrl) */ geometryServiceUrl: string; /** * The URL for the utility service used by [GeoRSSLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-GeoRSSLayer.html) to convert GeoRSS documents. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-config.html#geoRSSServiceUrl) */ geoRSSServiceUrl: string; /** * The URL for the utility service used by [KMLLayer](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-KMLLayer.html) to convert KML documents. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-config.html#kmlServiceUrl) */ kmlServiceUrl: string; /** * An object with properties that control various aspects of log messages. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-config.html#log) */ log: configLog; /** * The default URL of new portal instances. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-config.html#portalUrl) */ portalUrl: string; /** * An object with properties that control various aspects of communication between the library and web servers. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-config.html#request) */ request: configRequest; /** * The AMD loader's configuration object, which is loaded with each worker. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-config.html#workers) */ workers: configWorkers; } export const config: config; export type AfterInterceptorCallback = (response: RequestResponse) => void; export type BeforeInterceptorCallback = (params: any) => any; export interface configLog extends Object { /** * An array of custom interceptor functions that can be used to intercept log messages. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-config.html#log) */ interceptors: LogInterceptor[]; /** * The level of messages to log. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-config.html#log) */ level: "none" | "error" | "warn" | "info"; } export interface configRequest extends Object { /** * List of domain suffixes known to support https. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-config.html#request) */ httpsDomains?: string[]; /** * **Since:** 4.8 Allows developers to modify requests before or after they are sent. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-config.html#request) */ interceptors?: RequestInterceptor[]; /** * Maximum number of characters allowed in the URL for HTTP GET requests made by [request](https://developers.arcgis.com/javascript/latest/api-reference/esri-request.html). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-config.html#request) */ maxUrlLength?: number; /** * A proxy rule defines a proxy for a set of resources with an identical URL prefix. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-config.html#request) */ proxyRules?: configRequestProxyRules[]; /** * Resource proxy for your application. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-config.html#request) */ proxyUrl?: string; /** * Number of milliseconds [request](https://developers.arcgis.com/javascript/latest/api-reference/esri-request.html) will wait for response from a server. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-config.html#request) */ timeout?: number; /** * **Since:** 4.9 Indicates whether cross origin requests made to the associated server should include credentials such as cookies and authorization headers. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-config.html#request) */ trustedServers?: string[]; /** * **Since:** 4.5 Indicates whether `esri/request` will request a credential from `IdentityManager`. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-config.html#request) */ useIdentity?: boolean; } export interface configRequestProxyRules extends Object { /** * The URL of the proxy. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-config.html#request) */ proxyUrl?: string; /** * URL prefix for resources that need to be accessed through a specific proxy. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-config.html#request) */ urlPrefix?: string; } export interface configWorkers extends Object { /** * The absolute url to the AMD or SystemJS loader used in the worker. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-config.html#workers) */ loaderUrl?: any; /** * This is used by the `@arcgis/core` and `arcgis-js-api` NPM packages to control where to load a custom build of the `RemoteClient` from. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-config.html#workers) */ workerPath?: string; /** * The configuration parameters for [the workers framework](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-workers.html). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-config.html#workers) */ loaderConfig?: configWorkersLoaderConfig; } export interface configWorkersLoaderConfig extends Object { /** * The AMD loader loads all code relative to the baseUrl. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-config.html#workers) */ baseUrl?: string; /** * Determines if the specified feature capabilities are supported. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-config.html#workers) */ has?: any; /** * Map of module id fragments to file paths. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-config.html#workers) */ paths?: any; /** * Map paths in module identifiers to different paths. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-config.html#workers) */ map?: any; /** * An array of objects which provide the package name and its location. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-config.html#workers) */ packages?: any[]; } export type ErrorCallback = (error: Error) => void; export type LogInterceptor = (level: "error" | "warn" | "info", module: string, ...args: any[]) => boolean; /** * Specifies the object used for intercepting and modifying requests made via [esriRequest](https://developers.arcgis.com/javascript/latest/api-reference/esri-request.html). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-config.html#RequestInterceptor) */ export interface RequestInterceptor extends Object { /** * Makes changes to the response after the request is sent, but before it's returned to the caller. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-config.html#RequestInterceptor) */ after?: AfterInterceptorCallback; /** * Make changes to the request URL or options before the request is sent. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-config.html#RequestInterceptor) */ before?: BeforeInterceptorCallback; /** * When an error occurs during the request processing, this function is called with an [Error](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Error.html) object giving the details about what happened. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-config.html#RequestInterceptor) */ error?: ErrorCallback; /** * Sets or adds headers into `requestOptions.headers`. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-config.html#RequestInterceptor) */ headers?: any; /** * Sets or adds query parameters into `requestOptions.query`. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-config.html#RequestInterceptor) */ query?: any; /** * Hardcodes the [response](https://developers.arcgis.com/javascript/latest/api-reference/esri-request.html#RequestResponse). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-config.html#RequestInterceptor) */ responseData?: any; /** * Specifies the URL(s) to apply to the interceptors. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-config.html#RequestInterceptor) */ urls?: string | RegExp | (string | RegExp)[]; } export type WatchCallback = (newValue: any, oldValue: any, propertyName: string, target: Accessor) => void; /** * Represents a watch created when an object invokes [watch()](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Accessor.html#watch). * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Accessor.html#WatchHandle) */ export interface WatchHandle extends Object { /** * Removes the watch handle. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Accessor.html#WatchHandle) */ remove(): void; } /** * This module contains Accessor [TypeScript](https://www.typescriptlang.org/docs/handbook/decorators.html) decorators. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-accessorSupport-decorators.html) */ interface decorators { /** * A property decorator that creates a two-way binding between the property it decorates and an inner property of one of its members. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-accessorSupport-decorators.html#aliasOf) */ aliasOf(propertyName: string): Function; /** * This method decorator is used to define the method that will cast a property from a class. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-accessorSupport-decorators.html#cast) */ cast(propertyName: string): Function; /** * This property decorator is used to define the function or class for a property. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-accessorSupport-decorators.html#cast) */ cast(functionOrClass: Function): Function; /** * A function that can be used as a class. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-accessorSupport-decorators.html#declared) */ declared<T>(baseClass: T, ...mixinClasses: any[][]): T; /** * This convenience decorator is used to define an [Accessor](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Accessor.html) property. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-accessorSupport-decorators.html#property) */ property(propertyMetadata?: decoratorsPropertyPropertyMetadata): Function; subclass(declaredClass?: string): Function; } export const decorators: decorators; export interface decoratorsPropertyPropertyMetadata extends Object { /** * Property names of dependencies. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-accessorSupport-decorators.html#property) */ dependsOn?: string[]; /** * The constructor used to [autocast](https://developers.arcgis.com/javascript/latest/guide/programming-patterns/#autocasting) the property. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-accessorSupport-decorators.html#property) */ type?: Function; /** * The function to use to [autocast](https://developers.arcgis.com/javascript/latest/guide/programming-patterns/#autocasting) the property. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-accessorSupport-decorators.html#property) */ cast?: Function; /** * Indicates whether the property is read-only. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-accessorSupport-decorators.html#property) */ readOnly?: boolean; /** * Indicates whether the property can be set during construction but is otherwise read-only. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-accessorSupport-decorators.html#property) */ constructOnly?: boolean; /** * The property decorator that creates a two-way binding between the property it decorates and an inner property of one of its members. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-accessorSupport-decorators.html#property) */ aliasOf?: string; /** * The default value for the property. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-accessorSupport-decorators.html#property) */ value?: any; } export interface CollectionAfterAddEvent { item: any; } export interface CollectionAfterChangesEvent {} export interface CollectionAfterRemoveEvent { item: any; } export interface CollectionBeforeAddEvent { cancellable: boolean; defaultPrevented: boolean; item: any; preventDefault: Function; } export interface CollectionBeforeChangesEvent { cancellable: boolean; defaultPrevented: boolean; item: any; preventDefault: Function; } export interface CollectionBeforeRemoveEvent { cancellable: boolean; defaultPrevented: boolean; item: any; preventDefault: Function; } interface Error { /** * The details object provides additional details specific to the error, giving more information about why the error was raised. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Error.html#details) */ details: any; /** * A message describing the details of the error. * * [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-core