UNPKG

@vertigis/viewer-spec

Version:

VertiGIS Viewer Specification

105 lines (104 loc) 3.47 kB
import type { Command } from "../Command.js"; import { CommandRegistry } from "../CommandRegistry.js"; import type { Layers, MapsLike } from "../common.js"; /** * Arguments for the layer-comparison.set-mode command. */ export interface SetLayerComparisonModeArgs { /** * Whether or not the layer-comparison mode should be active. */ active: boolean; /** * The map(s) on which to set the layer-comparison mode. */ maps?: MapsLike; /** * Sets the leading layers on the map. */ leadingLayers?: Layers; /** * Sets the trailing layers on the map. */ trailingLayers?: Layers; } /** * Arguments for the layer-comparison.set-direction command. */ export interface SetLayerComparisonDirectionArgs { /** * The direction in which the layer-comparison tool should slide. */ direction: "horizontal" | "vertical"; /** * The map(s) on which to set the layer-comparison direction. */ maps?: MapsLike; } export declare class LayerComparisonCommands extends CommandRegistry { protected readonly _prefix = "layer-comparison"; /** * Activates or deactivates the layer-comparison mode on the map(s). Web * only. * * @webOnly */ get setMode(): Command<SetLayerComparisonModeArgs>; /** * Changes the orientation of the map(s') layer-comparison bar between * 'horizontal' and 'vertical'. Web only. * * @webOnly */ get setDirection(): Command<SetLayerComparisonDirectionArgs>; /** * Adds the layer(s) to the map's leading layers, which are used by the * layer-comparison tool. Leading layers are positioned at the left of the * map if the layer-comparison orientation is 'horizontal' and at the top of * the map if the layer-comparison orientation is 'vertical'. Adding a layer * to the leading layers will automatically remove it from the trailing * layers. Only operational layers that exist within a given map are valid - * others will be ignored. Web only. * * @webOnly */ get addLeadingLayers(): Command<Layers>; /** * Adds the layer(s) to the map's trailing layers, which are used by the * layer-comparison tool. Trailing layers are positioned at the right of the * map if the layer-comparison orientation is 'horizontal' and at the bottom * of the map if the layer-comparison orientation is 'vertical'. Adding a * layer to the trailing layers will automatically remove it from the * leading layers. Only operational layers that exist within a given map are * valid - others will be ignored. Web only. * * @webOnly */ get addTrailingLayers(): Command<Layers>; /** * Removes the layer(s) from the map's leading layers, which are used by the * layer-comparison tool. Web only. * * @webOnly */ get removeLeadingLayers(): Command<Layers>; /** * Removes the layer(s) from the map's trailing layers, which are used by * the layer-comparison tool. Web only. * * @webOnly */ get removeTrailingLayers(): Command<Layers>; /** * Removes all leading layers from the map(s). Web only. * * @webOnly */ get clearLeadingLayers(): Command<MapsLike | void>; /** * Removes all trailing layers from the map(s). Web only. * * @webOnly */ get clearTrailingLayers(): Command<MapsLike | void>; }