/// import type { TaskSettingsProperties } from "@vertigis/arcgis-extensions/data/TaskSettings.js"; import type { LabelingInfoJson } from "@vertigis/arcgis-extensions/json/DrawingInfoJson.js"; import type { PopupInfoJson } from "@vertigis/arcgis-extensions/json/PopupInfoJson.js"; import type { SpatialReferenceJson } from "@vertigis/arcgis-extensions/json/SpatialReferenceJson.js"; import type { Command } from "../Command.js"; import { CommandRegistry } from "../CommandRegistry.js"; import type { Event } from "../Event.js"; import { EventRegistry } from "../EventRegistry.js"; import type { Operation } from "../Operation.js"; import { OperationRegistry } from "../OperationRegistry.js"; import type { HasFiles, HasLayers, HasMaps, HasRenderers, HasSymbols, LayersLike } from "../common.js"; /** * Arguments for the "layers.visibility-changed" event. */ export interface LayerEventArgs { /** * The layer(s) whose visibility was changed. Web only. * * @webOnly */ layers?: LayersLike; /** * The layer whose visibility was changed. Mobile only. * * @mobileOnly */ layerContent?: ILayerContent; } /** * An instance of @Esri.ArcGISRuntime.Mapping.ILayerContent. */ export interface ILayerContent { } /** * Arguments for the "layers.show-labels" and "layers.hide-labels" commands. If * no 'maps' are specified, all active maps in the layout will be targeted. If * no 'layers' are specified, all viable layers and sublayers within the 'maps' * will be affected. If the 'layers' property includes (Sub)Layer references or * ESRI (Sub)Layers, they must exist within one of the 'maps'. */ export interface SetLabelVisibilityArgs extends HasLayers, HasMaps { } /** * Arguments for the layers.set-symbol command. */ export type SetSymbolArgs = HasLayers & HasMaps & HasRenderers & HasSymbols; /** * Arguments for the layers.set-visibility command. If no 'maps' are specified, * all active maps in the layout will be targeted. If no 'layers' are specified, * all viable layers and sublayers within the 'maps' will be affected. If the * 'layers' property includes (Sub)Layer references or ESRI (Sub)Layers, they * must exist within one of the 'maps'. */ export interface SetVisibilityArgs extends HasLayers, HasMaps { /** * The visibility of the provided layers. If arg is not provided, visibility * will be toggled. */ visible?: boolean; } /** * Common settings for a layer. */ export interface HasLayerSettings { /** * The definitionExpression of the layer. */ definitionExpression?: string; /** * Settings relevant to layer tasks. */ taskSettings?: TaskSettingsProperties | TaskSettingsProperties[]; /** * Configuration for a popup template to be used by features in the layer. */ popupTemplate?: PopupInfoJson | PopupInfoJson[]; /** * The title of the layer. */ title?: string | string[]; /** * The labeling class of the layer. */ labelingInfo?: LabelingInfoJson[] | LabelingInfoJson[][]; } /** * Arguments for a `layers.edit-settings` operation. */ export interface LayerSettingsArgs extends HasLayerSettings, HasLayers, HasSymbols, HasMaps { } /** * Arguments for the layers.from-kml operation. */ export interface FromKmlArgs extends HasFiles { } /** * Arguments for the layers.from-dxf operation. When the spatial references are * omitted, Web defaults both input and output to the active map's current * spatial reference. */ export interface FromDxfArgs extends HasFiles { /** * The spatial reference of the source DXF content. If not set, the active * map's spatial reference is used for the input. */ inputSpatialReference?: SpatialReferenceJson; /** * The spatial reference to project the resulting layers to. If not set, the * active map's spatial reference is used for the output. */ outputSpatialReference?: SpatialReferenceJson; } /** * Arguments for the layers.from-url operation. */ export interface FromUrlArgs { /** * The Url to add to the map. */ url: string; } export declare class LayersCommands extends CommandRegistry { protected readonly _prefix = "layers"; /** * Guard command for enabling the layers.set-symbol command. Web only. * * @webOnly */ get ensureCanSetSymbol(): Command; /** * Resets the definition expression of a layer to its initial state. If the * `layer` argument is undefined or an empty array, all layers will be * reset. Web only. * * @webOnly */ get resetDefinitionExpression(): Command; /** * Resets the symbol of a layer to its initial state. If the `layer` * argument is undefined or an empty array, all layers will be reset. Web * only. * * @webOnly */ get resetSymbol(): Command; /** * Sets a definition expression on a layer to filter its features. Web only. * * @webOnly */ get setDefinitionExpression(): Command; /** * Updates the label classes of the provided layer(s). Web only. * * @webOnly */ get setLabelClasses(): Command; /** * Updates the provided layer(s) with new popup template configuration. Web * only. * * @webOnly */ get setPopupTemplate(): Command; /** * Updates the symbol for the provided layer(s). Web only. * * @webOnly */ get setSymbol(): Command; /** * Updates the provided layer(s) with new task settings. Web only. * * @webOnly */ get setTaskSettings(): Command; /** * Changes the title of the provided layer(s). Web only. * * @webOnly */ get setTitle(): Command; /** * Updates the visibility of the provided layer(s). Web only. * * **Example:** Toggle a layer's visibility off by id. * * ``` * { * "layers": "Victoria_Fire_Hydrants_8780", * "visible": false * } * ``` * * **Example:** Toggle layers' current visibility in a particular map. * * ``` * { * "layers": ["Victoria_Fire_Hydrants_8780", "Victoria_Trees_91238_a"] * "maps": "item://map-extension/e285a558-20b3-4f3d-aa37-a289eedbef4p" * } * ``` * * @webOnly */ get setVisibility(): Command; /** * Turns on the layer's labels on the map. Web only. * * @webOnly */ get showLabels(): Command; /** * Turns off the layer's labels on the map. Web only. * * @webOnly */ get hideLabels(): Command; } export declare class LayersOperations extends OperationRegistry { protected readonly _prefix = "layers"; /** * Retrieves the popup configuration applied to the supplied layer(s). Web * only. * * @webOnly */ get getPopupTemplate(): Operation; /** * Retrieves the label classes for supplied layer(s). Web only. * * @webOnly */ get getLabelClasses(): Operation; /** * Retrieves the values for the 'taskSettings' applied to the supplied * layer(s). Web only. * * @webOnly */ get getTaskSettings(): Operation; /** * Retrieves the titles of the supplied layer(s). Web only. * * @webOnly */ get getTitle(): Operation; /** * Shows a UI for editing the settings on an existing layer or layers. Note * that changes will not be applied to the supplied layers by this * operation. Use `layers.set-*` for this. Web only. * * @webOnly */ get editSettings(): Operation; /** * Shows a UI for editing the label classes on an existing layer or layers. * Note that changes will not be applied to the supplied layers by this * operation. Use `layers.set-label-classes` for this. Web only. * * @webOnly */ get editLabelSettings(): Operation; /** * Edit the symbol from an existing layer or layers. Note that changes to * these symbols will not be applied to the layers by this operation. Use * `layers.set-symbol` for this. Web only. * * @webOnly */ get editSymbols(): Operation; /** * Convert the specified KML blob to layers. Web only. * * @webOnly */ get fromKml(): Operation; /** * Convert the specified DXF blob to layers. If spatial references are not * specified, Web defaults both the input and output to the active map's * spatial reference. * * @webOnly */ get fromDxf(): Operation; /** * Attempts to create layer(s) from a url. Web only. * * The url could be to an ArcGIS Server Url, WMS, WFS, WMTS, GeoJson, * GeoRss, Csv, Kml, kmz, OGC Feature Layer, or an Arcgis Portal Item. * * @webOnly */ get fromUrl(): Operation; } export declare class LayersEvents extends EventRegistry { protected readonly _prefix = "layers"; /** * Raised when a layer's definition expression changes. Web only. * * @webOnly */ get definitionExpressionChanged(): Event; /** * Raised when a layer's visibility changes. */ get visibilityChanged(): Event; }