@arcgis/map-components
Version:
ArcGIS Map Components
366 lines (364 loc) • 19.9 kB
TypeScript
/// <reference types="@arcgis/core/interfaces.d.ts" />
/// <reference types="../../index.d.ts" />
import { Use } from '@arcgis/lumina/controllers';
import { Nil } from '@arcgis/components-utils';
import { default as LinkChartView } from '@arcgis/core/views/LinkChartView.js';
import { default as WebLinkChart } from '@arcgis/core/WebLinkChart.js';
import { PublicLitElement as LitElement, TargetedEvent } from '@arcgis/lumina';
declare const useWebLinkChart: (component: LitElement & Omit<Pick<WebLinkChart, "basemap" | "focusAreas" | "ground" | "layers" | "bookmarks" | "tables" | "widgets" | "applicationProperties" | "authoringApp" | "authoringAppVersion" | "floorInfo" | "initialViewProperties" | "linkChartProperties" | "mapType" | "portalItem" | "thumbnailUrl">, "basemap" | "ground" | ("destroyed" | "initialized" | "declaredClass" | "set" | "watch" | "addHandles" | "removeHandles" | "hasHandles") | "layers" | "bookmarks" | "tables" | "presentation" | "knowledgeGraph" | "widgets" | "applicationProperties" | "authoringApp" | "authoringAppVersion" | "entityCount" | "floorInfo" | "geotriggersInfo" | "initialViewProperties" | "linkChartProperties" | "mapType" | "portalItem" | "relationshipCount" | "thumbnailUrl"> & {
autoDestroyDisabled: boolean;
destroy: () => Promise<void>;
}) => WebLinkChart;
declare const useLinkChartView: (component: LitElement & Omit<Pick<LinkChartView, "container" | "map" | "background" | "basemapView" | "center" | "constraints" | "extent" | "fatalError" | "graphics" | "highlights" | "navigation" | "padding" | "popup" | "resizeAlign" | "rotation" | "scale" | "spatialReference" | "theme" | "timeExtent" | "timeZone" | "viewpoint" | "zoom" | "floors" | "highlightOptions" | "breakpoints" | "heightBreakpoint" | "popupEnabled" | "spatialReferenceLocked" | "widthBreakpoint" | "ui" | "animation" | "displayFilterEnabled">, "container" | "floors" | "highlightOptions" | ("destroyed" | "initialized" | "declaredClass" | "set" | "watch" | "addHandles" | "removeHandles" | "hasHandles") | "breakpoints" | "heightBreakpoint" | "popupEnabled" | "spatialReferenceLocked" | "widthBreakpoint" | "ui" | "animation" | "displayFilterEnabled"> & {
autoDestroyDisabled: boolean;
destroy: () => Promise<void>;
}) => LinkChartView;
/**
* Loads a [WebLinkChart](https://developers.arcgis.com/javascript/latest/api-reference/esri-WebLinkChart.html) from an [ArcGIS Enterprise portal](https://enterprise.arcgis.com/en/portal/latest/administer/windows/what-is-portal-for-arcgis-.htm) into a [LinkChartView](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-LinkChartView.html).
*
*
* Note: Sign in to access the data in this demo, U/P: `viewer01`/`I68VGU^nMurF`
*
* [Read more...](https://developers.arcgis.com/javascript/latest/references/map-components/arcgis-link-chart/)
*/
export declare class ArcgisLinkChart extends LitElement {
/** Internal view of the component. */
readonly view: LinkChartView;
/**
* Collection containing a flat list of all the created LayerViews
* related to the basemap, operational layers, and group layers in this view.
*/
readonly allLayerViews: __esri.Collection<__esri.LayerView>;
/**
* 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](https://developers.arcgis.com/javascript/latest/references/map-components/arcgis-link-chart/#destroy) method when you are done to
* prevent memory leaks.
*
* @default false
*/
autoDestroyDisabled: boolean;
/**
* The background color of the LinkChartView. If the view's link chart changes, the view's `background` is reset to the link chart's background,
* even if the user set it previously.
*
* @default null
*/
background: nullish | __esri.ColorBackground;
/**
* Specifies a basemap for the link chart. The basemap is only visible when the link
* chart is set to a geographic layout. See
* [documentation on layouts](https://enterprise.arcgis.com/en/knowledge/latest/knowledge-studio/change-the-layout-applied-to-a-link-chart.htm)
* for more detail. The basemap is a set of layers that give
* geographic context to the LinkChartView and the other operational layers
* in the link chart.
*/
basemap?: __esri.Basemap | string;
/** Represents the view for a single basemap after it has been added to the link chart. */
basemapView: __esri.BasemapView;
/**
* Represents the view's center point; when setting the center, you may pass a
* esri/geometry/Point instance or a string representing
* a longitude/latitude pair (`"-100.4593, 36.9014"`).
* Setting the center immediately changes the current view.
* For animating the view, see this component's goTo() method.
*/
get center(): __esri.LinkChartView["center"];
set center(newValue: __esri.LinkChartView["center"] | Nil | number[] | string);
/** Specifies constraints to scale, zoom, and rotation that may be applied to the LinkChartView. */
constraints: __esri.View2DConstraints;
/**
* Indicates whether layer's displayFilter are honored when rendering layers in the view.
* If `false`, display filters are ignored and all features are rendered.
*
* @default false
*/
displayFilterDisabled: boolean;
/**
* The extent represents the visible portion of a link chart within the view as an instance of
* [Extent](https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html).
* Setting the extent immediately changes the view without animation. To animate
* the view, see this component's goTo() method.
* When the view is rotated, the extent does not update to include the newly visible portions of the link chart.
*/
get extent(): __esri.LinkChartView["extent"];
set extent(newValue: __esri.LinkChartView["extent"]);
/** A rejected view indicates a fatal error making it unable to display. */
fatalError: nullish | __esri.Error;
/**
* Allows for adding graphics directly to the default graphics in the View.
*
* @example
* ```js
* // Adds a graphic to the View
* graphics.add(pointGraphic);
* ```
* @example
* ```js
* // Removes a graphic from the View
* graphics.remove(pointGraphic);
* ```
*/
graphics: __esri.Collection<__esri.Graphic>;
/**
* The highlights property is a collection of HighlightGroup objects that
* allow you to visually emphasize specific features on the link chart.
*/
highlights: __esri.Collection<__esri.HighlightOptions>;
/**
* Indication whether the view is being interacted with (for example when panning or by an interactive tool).
*
* @default false
*/
get interacting(): boolean;
/**
* The ID of a WebLinkChart from an ArcGIS Enterprise portal.
*
* To configure the portal url you must set the [`portalUrl` property on `config`](https://developers.arcgis.com/javascript/latest/api-reference/esri-config.html#portalUrl) before the Link Chart component loads.
*/
get itemId(): Nil | string;
set itemId(newValue: Nil | string);
/**
* A collection containing a hierarchical list of all the created
* [LayerViews](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-LayerView.html) of the
* [operational layers](https://developers.arcgis.com/javascript/latest/api-reference/esri-WebLinkChart.html#layers) in the link chart.
*/
readonly layerViews: __esri.Collection<__esri.LayerView>;
/** The magnifier allows for showing a portion of the view as a magnifier image on top of the view. */
readonly magnifier: __esri.Magnifier;
/**
* An instance of a [WebLinkChart](https://developers.arcgis.com/javascript/latest/api-reference/esri-WebLinkChart.html)
* object to display in the view.
*/
map: WebLinkChart | nullish;
/**
* Indication whether the view is being navigated (for example when panning).
*
* @default false
*/
get navigating(): boolean;
/** Options to configure the navigation behavior of the View. */
navigation: __esri.Navigation;
/**
* Use the padding property to make the [center](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#center),
* and [extent](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#extent), etc.
*
* @default {left: 0, top: 0, right: 0, bottom: 0}
*/
padding: __esri.ViewPadding;
/**
* A [Popup](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Popup.html) object that displays general content or attributes from
* [layers](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html#layers) in the [map](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View2D.html#map).
*
* [Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View2D.html#popup)
*/
popup: nullish | __esri.Popup;
/**
* Controls whether the popup opens when users click on the view.
*
* @default false
*/
popupDisabled: boolean;
/**
* When `true`, this property indicates whether the view successfully satisfied all dependencies,
* signaling that the following conditions are met.
*
* @default false
*/
readonly ready: boolean;
/**
* Defines which anchor stays still while resizing the browser window. The default, `center`,
* ensures the view's center point remains constantly visible as the window size changes. The other
* options allow the respective portion of the view to remain visible when the window's size is changed.
*
* @default "center"
*/
resizeAlign: "center" | "bottom-left" | "bottom-right" | "top-left" | "top-right" | "left" | "right" | "top" | "bottom";
/**
* Represents the current value of one pixel in the unit of the view's spatialReference.
* The value of resolution is calculated by dividing the view's extent width
* by its width.
*/
readonly resolution: number;
/**
* The clockwise rotation of due north in relation to the top of the view in degrees.
* The view may be rotated by directly setting
* the rotation or by using the following mouse event: `Right-click + Drag`.
* WebLinkChart rotation may be disabled by setting the `rotationEnabled` property
* in [constraints](#constraints) to `false`.
*
* @default 0
*/
rotation: number;
/**
* Represents the link chart scale at the center of the view. Setting the scale immediately changes the view. For animating
* the view, see this component's goTo() method.
*/
get scale(): number;
set scale(newValue: number);
/**
* The spatial reference of the view.
* This indicates the projected or geographic coordinate system used
* to locate geographic features in the link chart.
*
* @default null
*/
spatialReference: __esri.SpatialReference;
/**
* Indication whether the view is animating, being navigated with or resizing.
*
* @default false
*/
get stationary(): boolean;
/**
* Indicates if the view is visible on the page.
*
* @default true
*/
readonly suspended: boolean;
/**
* This property specifies the base colors used by some widgets
* and components to render graphics and labels.
*
* @default null
*/
theme: nullish | __esri.Theme;
/**
* The view's time extent. Time-aware layers display their temporal data that falls within
* the view's time extent. Setting the view's time extent is similar to setting the spatial
* extent because once the time extent is set, the
* view updates automatically to conform to the change.
*
* @default null
*/
timeExtent: nullish | __esri.TimeExtent;
/**
* Defines the time zone of the view.
* The time zone property determines how dates and times are represented to the user,
* but the underlying data is unchanged.
*
* @default "system"
*/
timeZone: string;
/**
* Indicates whether the view is being updated by additional data requests to the network,
* or by processing received data.
*
* @default false
*/
readonly updating: boolean;
/**
* Represents the current view as a Viewpoint or point of observation on the view.
* Setting the viewpoint immediately changes the current view. For animating
* the view, see this component's goTo() method.
*/
get viewpoint(): __esri.Viewpoint;
set viewpoint(newValue: __esri.Viewpoint);
/**
* Represents the level of detail (LOD) at the center of the view.
* A zoom level (or scale) is a number that defines how large or small the contents of a link chart appear in a link chart view.
* Zoom level is a number usually between 0 (global view) and 23 (very detailed view) and is used as a shorthand for predetermined scale values.
* A value of -1 means the view has no LODs.
* When setting the zoom value, the LinkChartView converts it to the corresponding scale, or interpolates it if the zoom is a fractional number.
* LinkChartView can display link charts with different projections at a full range of scales, and so use the scale property on this component rather than zoom level.
*
* Setting the zoom immediately changes the current view. For animating the view, see this component's goTo() method.
* Setting this property in conjunction with `center` is a convenient way to set the initial extent of the view.
*/
get zoom(): number;
set zoom(newValue: number);
/**
* @deprecated
* since 4.33, use `element.map.add(layer)` instead.
*
* Adds a layer to the map layers collection.
*/
addLayer(layer: __esri.Layer | Promise<any>, index?: number): Promise<void>;
/**
* @deprecated
* since 4.33, use `element.map.addMany([layer])` instead.
*
* Adds a layer or array of layers to the map layers collection.
*/
addLayers(layers: __esri.Layer[], index?: number): Promise<void>;
/** Closes the popup. */
closePopup(): Promise<void>;
/** Destroys the view, and any associated resources, including its map, popup, and UI elements. */
destroy(): Promise<void>;
/** Sets the view to a given target. */
goTo(target: __esri.GoToTarget2D, options?: __esri.GoToOptions2D): Promise<unknown>;
/**
* Opens the popup at the given location with content defined either explicitly with content or driven
* from the PopupTemplate of input features.
*/
openPopup(options?: __esri.PopupViewOpenPopupOptions): Promise<void>;
toMap(screenPoint: __esri.MapViewScreenPoint | MouseEvent): __esri.Point;
toScreen(point: __esri.Point, options?: __esri.ToScreenOptions2D): __esri.MapViewScreenPoint | nullish;
/** Call this method to clear any fatal errors resulting from a lost WebGL context. */
tryFatalErrorRecovery(): Promise<void>;
/** Gets the LayerView created on the view for the given layer. */
whenLayerView(layer: __esri.Layer): Promise<__esri.LayerView>;
/**
* `viewOnReady()` may be leveraged once an instance of the component and its underlying [view](https://developers.arcgis.com/javascript/latest/references/map-components/arcgis-link-chart/#view) is created and ready.
* This method takes two input parameters, a `callback` function and an `errback` function, and returns a promise. The `callback` executes when the promise resolves, and the `errback` executes if the promise is rejected.
*
* @since 4.33
* @see [Watch for changes - waiting for components or views to be ready](https://developers.arcgis.com/javascript/latest/watch-for-changes/#waiting-for-components-or-views-to-be-ready)
* @example
* ```js
* const viewElement = document.querySelector("arcgis-link-chart");
* await viewElement.viewOnReady();
* // The view is now ready to be used.
* ```
*/
viewOnReady(callback?: () => void, errback?: (error: Error) => void): Promise<void>;
/**
* This event is for view related property changes: zoom, scale, center, rotation, extent, camera, viewpoint.
* This event will also emit if stationary toggles from true to false.
*/
readonly arcgisViewChange: TargetedEvent<this, void>;
/** Fires after a user clicks on the view. */
readonly arcgisViewClick: TargetedEvent<this, __esri.ViewClickEvent>;
/** Fires after double-clicking on the view. */
readonly arcgisViewDoubleClick: TargetedEvent<this, __esri.ViewDoubleClickEvent>;
/** Fires during a pointer drag on the view. */
readonly arcgisViewDrag: TargetedEvent<this, __esri.ViewDragEvent>;
/** Fires during a pointer drag on the view. */
readonly arcgisViewHold: TargetedEvent<this, __esri.ViewHoldEvent>;
/** Fires right after a user clicks on the view. */
readonly arcgisViewImmediateClick: TargetedEvent<this, __esri.ViewImmediateClickEvent>;
/** Is emitted after two consecutive immediate-click events. */
readonly arcgisViewImmediateDoubleClick: TargetedEvent<this, __esri.ViewImmediateDoubleClickEvent>;
/** Fires after a keyboard key is pressed. */
readonly arcgisViewKeyDown: TargetedEvent<this, __esri.ViewKeyDownEvent>;
/** Fires after a keyboard key is pressed. */
readonly arcgisViewKeyUp: TargetedEvent<this, __esri.ViewKeyUpEvent>;
/** Fires after each layer in the link chart has a corresponding LayerView created and rendered in the view. */
readonly arcgisViewLayerviewCreate: TargetedEvent<this, __esri.ViewLayerviewCreateEvent>;
/** Fires when an error emits during the creation of a LayerView after a layer has been added to the link chart. */
readonly arcgisViewLayerviewCreateError: TargetedEvent<this, __esri.ViewLayerviewCreateErrorEvent>;
/** Fires after a LayerView is destroyed and is no longer rendered in the view. */
readonly arcgisViewLayerviewDestroy: TargetedEvent<this, __esri.ViewLayerviewDestroyEvent>;
/** Fires when a wheel button of a pointing device (typically a mouse) is scrolled on the view. */
readonly arcgisViewMouseWheel: TargetedEvent<this, __esri.ViewMouseWheelEvent>;
/** Fires after a mouse button is pressed, or a finger touches the display. */
readonly arcgisViewPointerDown: TargetedEvent<this, __esri.ViewPointerDownEvent>;
/** Fires after a mouse cursor enters the view, or a display touch begins. */
readonly arcgisViewPointerEnter: TargetedEvent<this, __esri.ViewPointerEnterEvent>;
/** Fires after a mouse cursor leaves the view, or a display touch ends. */
readonly arcgisViewPointerLeave: TargetedEvent<this, __esri.ViewPointerLeaveEvent>;
/** Fires after the mouse or a finger on the display moves. */
readonly arcgisViewPointerMove: TargetedEvent<this, __esri.ViewPointerMoveEvent>;
/** Fires after a mouse button is released, or a display touch ends. */
readonly arcgisViewPointerUp: TargetedEvent<this, __esri.ViewPointerUpEvent>;
/**
* This event is for the `ready` property and will be emitted when the view is ready.
* This event will also emit if the `map` property is changed.
*/
readonly arcgisViewReadyChange: TargetedEvent<this, void>;
readonly _setterTypes: {
center?: __esri.LinkChartView["center"] | Nil | number[] | string;
};
}
export {};