UNPKG

@arcgis/core

Version:

ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API

58 lines (56 loc) 4.19 kB
import type Collection from "../../core/Collection.js"; import type Layer from "../Layer.js"; import type { MultiOriginJSONSupportMixin } from "../../core/MultiOriginJSONSupport.js"; import type { BlendLayer, BlendLayerProperties } from "../mixins/BlendLayer.js"; import type { ScaleRangeLayer, ScaleRangeLayerProperties } from "../mixins/ScaleRangeLayer.js"; import type { LayerProperties } from "../Layer.js"; export interface CatalogDynamicGroupLayerProperties extends LayerProperties, BlendLayerProperties, ScaleRangeLayerProperties, Partial<Pick<CatalogDynamicGroupLayer, "legendEnabled" | "maximumVisibleSublayers">> {} /** * CatalogDynamicGroupLayer is a sublayer of the [CatalogLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/CatalogLayer/) that displays catalog items (layers) in the current view. * Since it is dynamic, its list of catalog items in the [LayerList.catalogLayerList](https://developers.arcgis.com/javascript/latest/references/core/widgets/LayerList/#catalogLayerList) changes as you interact with the map. * By default, CatalogDynamicGroupLayer draws up to 10 catalog items or layers at a time. This default setting can be changed by adjusting the * [maximumVisibleSublayers](https://developers.arcgis.com/javascript/latest/references/core/layers/catalog/CatalogDynamicGroupLayer/#maximumVisibleSublayers) property. * * The [layers](https://developers.arcgis.com/javascript/latest/references/core/layers/catalog/CatalogDynamicGroupLayer/#layers) in the CatalogDynamicGroupLayer are read-only and not editable. All catalog items draw with their default symbology. * To change layer configurations of a catalog item, you must add the layer to the map by calling [CatalogLayer.createLayerFromFootprint()](https://developers.arcgis.com/javascript/latest/references/core/layers/CatalogLayer/#createLayerFromFootprint) * method on the parent [CatalogLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/CatalogLayer/). * * @since 4.30 * @see [CatalogLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/CatalogLayer/) * @see [CatalogFootprintLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/catalog/CatalogFootprintLayer/) * @see [Sample - Intro to CatalogLayer](https://developers.arcgis.com/javascript/latest/sample-code/layers-cataloglayer/) * @see [Sample - Explore data in CatalogLayer](https://developers.arcgis.com/javascript/latest/sample-code/layers-cataloglayer-2d/) */ export default class CatalogDynamicGroupLayer extends CatalogDynamicGroupLayerSuperclass { constructor(properties?: CatalogDynamicGroupLayerProperties); /** A collection of [layers](https://developers.arcgis.com/javascript/latest/references/core/layers/Layer/) referenced in the CatalogLayer. */ get layers(): Collection<Layer>; /** * Indicates whether the layer will be included in the legend. When `false`, the layer will be excluded from the legend. * * @default true */ accessor legendEnabled: boolean; /** * The maximum number of sublayers that can be visible at once in a CatalogDynamicGroupLayer. * This value can range between `0` and `50`. * * @default 10 * @example * // Change the maximumVisibleSublayers of the dynamicGroupLayer after the catalog layer is loaded * const layerView = await view.whenLayerView(layer); * await reactiveUtils.whenOnce(() => !layerView.updating); * layer.dynamicGroupLayer.maximumVisibleSublayers = 20; */ accessor maximumVisibleSublayers: number; /** * Enable persistence of the layer in a [WebMap](https://developers.arcgis.com/javascript/latest/references/core/WebMap/) or [WebScene](https://developers.arcgis.com/javascript/latest/references/core/WebScene/). * * @default true * @since 4.28 */ get persistenceEnabled(): boolean; /** The layer type provides a convenient way to check the type of the layer without the need to import specific layer modules. */ get type(): "catalog-dynamic-group"; } declare const CatalogDynamicGroupLayerSuperclass: typeof Layer & typeof MultiOriginJSONSupportMixin & typeof BlendLayer & typeof ScaleRangeLayer