import type Graphic from "@arcgis/core/Graphic.js"; import type EsriMap from "@arcgis/core/Map.js"; import type Viewpoint from "@arcgis/core/Viewpoint.js"; import type Extent from "@arcgis/core/geometry/Extent.js"; import type Point from "@arcgis/core/geometry/Point.js"; import type SpatialReference from "@arcgis/core/geometry/SpatialReference.js"; import type GeographicTransformation from "@arcgis/core/geometry/operators/support/GeographicTransformation.js"; import type Layer from "@arcgis/core/layers/Layer.js"; import type { GeometryUnion } from "@arcgis/core/unionTypes.js"; import type { GeometryJsonType } from "@vertigis/arcgis-extensions/json/GeometryJson.js"; import type { OperationalLayerJson } from "@vertigis/arcgis-extensions/json/OperationalLayerJson.js"; import type { SymbolJson } from "@vertigis/arcgis-extensions/json/SymbolJson.js"; import type { LayerPreset } from "@vertigis/arcgis-extensions/layer-preset/LayerPreset.js"; import type { LayerExtension } from "@vertigis/arcgis-extensions/mapping/LayerExtension.js"; import type { MapExtension, ViewMode } from "@vertigis/arcgis-extensions/mapping/MapExtension.js"; import type { Action } from "@vertigis/arcgis-extensions/support/Action.js"; import type { PortalItemLike } from "@vertigis/arcgis-extensions/utilities/portal.js"; import type { Command } from "../Command.js"; import { CommandRegistry } from "../CommandRegistry.js"; import type { TimeSpan } from "../DotNetTypes.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 { Features, FeaturesLike, Geometries, GeometryLike, GraphicsLike, HasMaps, HasUITarget, Layers, LayersLike, Maps, MapsLike, ViewpointLike } from "../common.js"; import type { EnhancedFileData } from "./file.js"; import type { PortalItemData } from "./portal.js"; import type { GeometryEditorSettings } from "./sketching.js"; /** * Levels (z-orders) to which markup can be assigned, listed from high to low. */ export type MarkupLevel = "ui" | "labels" | "custom3" | "custom2" | "custom1" | "default"; /** * Arguments for the various map events. */ export interface MapEvent { /** * The map from which the event was generated. Web only. * * @webOnly */ maps?: MapsLike; /** * The map extension for which the event was generated. This property is * required in VertiGIS Studio Mobile. Mobile only. * * @mobileOnly */ mapExtension?: MapExtension; } /** * Arguments for the ViewModeChanged event. */ export interface ViewModeChangedEvent extends MapEvent { /** * The new ViewMode. */ viewMode?: ViewMode; } /** * Arguments for the map.zoom-to-viewpoint command. */ export interface ZoomToViewpointArgs { /** * The map(s) to zoom. If omitted, all maps will be zoomed. */ maps?: MapsLike; /** * The viewpoint to zoom to. */ viewpoint: ViewpointLike | string; } /** * The result of getting a Viewpoint. */ export interface GetViewpointResult { /** * The map(s) used in the operation. */ maps?: MapsLike; /** * The viewpoint. */ viewpoint: Viewpoint; } /** * Arguments for the map.zoom-to-layer-extent and * map.zoom-to-layer-visible-scale commands. */ export interface ZoomToLayerArgs { /** * The map(s) to zoom. If omitted, all maps will be zoomed. */ maps?: MapsLike; /** * The layer(s) to zoom to. */ layers: LayersLike; } /** * Arguments for the map.zoom-to-scale command. */ export interface ZoomToScaleArgs { /** * The map(s) to zoom. If omitted, all maps will be zoomed. */ maps?: MapsLike; /** * The scale to zoom to. */ scale: number; } /** * Arguments for the map.zoom-to-features command. */ export interface ZoomToFeaturesArgs { /** * The map(s) to zoom. If omitted, all maps will be zoomed. */ maps?: MapsLike; /** * The feature(s) to zoom to. */ features: FeaturesLike; } /** * Arguments for the "map.get-extent" operation. */ export interface GetExtentArgs { /** * The map from which to retrieve the extent. */ maps?: MapsLike; } /** * Result of the "map.get-extent" operation. */ export interface GetExtentResult { /** * The extent for the selected map. */ geometry: GeometryUnion; /** * The associated map for the retrieved extent. */ maps: MapsLike; } /** * Base arguments for markup commands and operations. */ export interface MarkupArgs extends HasMaps { /** * The named collection of markup to operate on. If not specified, the * default markup collection will be used. * * Note that collections with names prefixed by "vgs" are reserved for * internal system use and should not be referenced directly. * * Web only. * * @webOnly */ collection?: string; } /** * Arguments for the "map.add-markup" command. */ export interface AddMarkupArgs extends MarkupArgs { /** * The markup to add to the map. `GraphicsLike` is only available in Web. */ graphics?: Graphic[] | GraphicsLike; /** * The level (z-order) to assign the markup to. If not specified uses the * same level as default markup. Web only. * * @webOnly */ level?: MarkupLevel; } /** * Arguments for the "map.clear-markup" command. * * @webOnly */ export interface ClearMarkupArgs extends MarkupArgs { /** * The markup to clear. If not specified will clear all markup in the * selected collection. */ graphics?: GraphicsLike; } /** * Arguments for the "map.get-markup" operation. */ export interface GetMarkupArgs extends MarkupArgs { /** * The geometry used to bound the retrieved markup. If not specified all * markup in the selected collection will be returned. */ geometry?: GeometryUnion; } /** * Result of the "map.get-markup" operation. */ export interface GetMarkupResult { /** * The markup results. */ graphics: GraphicsLike; /** * The associated map the markup was retrieved from. */ maps?: MapsLike; } /** * Represents an operational layer. */ export type OperationalLayerLike = Layer | OperationalLayerJson | LayerExtension | PortalItemLike; /** * Arguments for the map.add-layers command. */ export interface AddLayersArgs { /** * The layer(s) to add. */ layers: OperationalLayerLike | OperationalLayerLike[]; /** * The associated map(s) for the layer(s). */ maps?: MapsLike; } /** * Arguments for the map.remove-layers command. */ export interface RemoveLayersArgs { /** * The layer(s) to remove. */ layers: LayersLike; /** * The associated map(s) for the layer(s). */ maps?: MapsLike; } /** * Arguments for the map.apply-layer-preset command. */ export interface ApplyLayerPresetArgs { /** * The map(s) to which the layerPreset will be applied. */ maps?: MapsLike; /** * The LayerPreset to apply. */ layerPreset: LayerPreset; } /** * Arguments for the map.update-layer command. */ export interface UpdateLayerArgs { /** * The associated map(s) for the layer(s). */ maps?: MapsLike; /** * The web map spec JSON used to update the Layer. */ layerJson: OperationalLayerJson; /** * The layer to update. If more than one layer is present, only the first * will be updated and the rest will be ignored. */ layers: LayersLike; } /** * Arguments for the map.create-note command. */ export interface CreateMapNoteArgs extends HasUITarget { /** * Optionally the features that can be referenced for inserting snippets. */ features?: FeaturesLike; /** * The map that should show the created note. */ maps?: MapsLike; /** * The location for the map note. */ geometry: Point; } /** * Arguments for the map.edit-note command. */ export interface EditMapNotesArgs extends HasUITarget { /** * Optionally the features that can be referenced for inserting snippets. */ features?: FeaturesLike; /** * The map on which to edit the result. */ maps: MapsLike; /** * The geometry from which to attempt to select the note. */ geometry?: Point; } /** * Arguments for the map.get-user-coordinates-input operation. */ export interface GetCoordinateArgs extends HasUITarget { /** * The map on which to select the result. */ maps?: MapsLike; /** * Indicates if the user should be given the option to select a point from * the map. */ allowSelectFromMap?: boolean; /** * An optional starting coordinate. */ geometry?: Point; /** * Optionally override the display text on the complete button. Defaults to * 'OK'. */ completeLabel?: string; } /** * The result of a map.get-user-coordinates-input operation. */ export interface GetCoordinateResult { /** * The result. */ geometry: Point; /** * The associated map. */ maps: MapsLike; } /** * The unit for calculating the buffer distance when 'distance' is specified for * a filter effect. */ export type FilterDistanceUnits = "feet" | "miles" | "nautical-miles" | "meters" | "kilometers"; /** * The spatial relationship for a filter effect. */ export type FilterSpatialRelationship = "contains" | "crosses" | "envelope-intersects" | "overlaps" | "touches" | "within" | "disjoint" | "intersects"; /** * A time extent for a filter effect. */ export interface TimeExtent { /** * The beginning of the time interval, as either a JavaScript Date object or * the number of milliseconds elapsed since January 1, 1970 00:00:00 UTC. */ start: Date | number; /** * The end of the time interval, as either a JavaScript Date object or the * number of milliseconds elapsed since January 1, 1970 00:00:00 UTC. */ end: Date | number; } /** * Filter effect configuration for either the included or excluded filter. */ export interface FilterEffectSettings { /** * Converts the input image to grayscale. The value defines the proportion * of the conversion. A value of 100% (or 1) is completely grayscale. A * value of 0% (or 0) leaves the input unchanged. See * https://developer.mozilla.org/en-US/docs/Web/CSS/filter-function/grayscale * for more details. */ grayscale?: string; /** * Converts the input image to sepia. The value defines the proportion of * the conversion. A value of 100% (or 1) is completely grayscale. A value * of 0% (or 0) leaves the input unchanged. See * https://developer.mozilla.org/en-US/docs/Web/CSS/filter-function/sepia * for more details. */ sepia?: string; /** * Applies a hue rotation on the input image. The value defines the number * of degrees around the color circle the input samples will be adjusted. A * value of 0deg leaves the input unchanged. There is no maximum value; the * effect of values above 360deg wraps around. See * https://developer.mozilla.org/en-US/docs/Web/CSS/filter-function/hue-rotate * for more details. */ hueRotate?: string; /** * Inverts the samples in the input image. The value defines the proportion * of the conversion. A value of 100% (or 1) is completely inverted. A value * of 0% (or 0) leaves the input unchanged. See * https://developer.mozilla.org/en-US/docs/Web/CSS/filter-function/invert * for more details. */ invert?: string; /** * Applies transparency to the samples in the input image. The value defines * the proportion of the conversion. A value of 0% (or 0) is completely * transparent. A value of 100% (or 1) leaves the input unchanged. See * https://developer.mozilla.org/en-US/docs/Web/CSS/filter-function/opacity * for more details. */ opacity?: string; /** * Applies a linear multiplier to the input image, making it appear more or * less bright. A value of 0% (or 0) will create an image that is completely * black. A value of 100% (or 1) leaves the input unchanged. Values of an * amount over 100% are allowed, providing brighter results. See * https://developer.mozilla.org/en-US/docs/Web/CSS/filter-function/brightness * for more details. */ brightness?: string; /** * Adjusts the contrast of the input image. A value of 0% (or 0) will create * an image that is completely gray. A value of 100% (or 1) leaves the input * unchanged. Values of an amount over 100% are allowed, providing results * with more contrast. See * https://developer.mozilla.org/en-US/docs/Web/CSS/filter-function/contrast * for more details. */ contrast?: string; } /** * A feature mode for use with filter effects (see * `ApplyFilterEffectArgs.featureMode`). */ export type FilterEffectFeatureMode = "include" | "exclude" | "replace"; /** * The required arguments for the 'maps.apply-filter-effect' command. */ export interface ApplyFilterEffectArgs { /** * The layer(s) to which the filter effect will be applied. When defined, * the filter only gets set on the corresponding LayerView. If no 'layer' is * defined, all applicable layers included in the specified 'maps' will * receive the filter effect. */ layers?: LayersLike; /** * The map(s) whose layers will receive the filter effect. If no 'maps' nor * 'layer' are defined, all applicable layers on all maps will receive the * filter effect. */ maps?: MapsLike; /** * A where clause for the feature filter. Any legal SQL92 where clause * operating on the fields in the 'layer' is allowed. The 'where' clause is * ignored if no 'layer' is defined. */ where?: string; /** * The features to which the filter effect is applied. If the 'layer' * property is set, only features from that layer will be effected; * otherwise, the filter effect is applied to each of the features' source * layers and all other applicable layers on the 'maps' will receive the * 'excludedEffect'. */ features?: Features; /** * How the features are used in the filter effect. 'include' includes new * features to any that may exist within an existing effect. 'exclude' * removes features that may exist within an existing effect. 'replace' * replaces any features that may exist within an existing effect. The * default is 'include'. */ featureMode?: FilterEffectFeatureMode; /** * The geometry to apply to the spatial filter. The spatial relationship, as * specified by the 'spatialRelationship' property, will indicate how the * geometry should be used to filter features. */ geometry?: GeometryUnion; /** * The spatial relationship to filter features in the layer view against the * filter 'geometry'. */ spatialRelationship?: FilterSpatialRelationship; /** * Specifies a search distance from a given 'geometry' in the spatial * filter. In essence, setting this property creates a buffer at the * specified size around the input 'geometry'. */ distance?: number; /** * The unit for calculating the buffer distance when 'distance' is defined * for the spatial filter. If 'units' is not specified, the unit is derived * from the filter geometry's spatial reference. */ units?: FilterDistanceUnits; /** * A range of time with start and end date. Only the features that fall * within this time extent will be included. */ timeExtent?: TimeExtent; /** * The effect given to features that match the filter. */ includedEffect?: FilterEffectSettings; /** * The effect given to features that don't match the filter. */ excludedEffect?: FilterEffectSettings; } /** * Result of the "map.get-view-insets" operation {@link Thickness}. */ export interface GetViewInsetsArgs { /** * The width covering the map on the left. */ left: number; /** * The width covering the map from above. */ top: number; /** * The width covering the map on the right. */ right: number; /** * The width covering the map from below. */ bottom: number; } /** * Arguments for the "map.display-extent-selector" command. */ export interface DisplayExtentSelectorArgs { /** * Help text to display above the extent selector overlay to give context to * what the user is expected to do. */ selectorHelpText: string; /** * The command to execute when the extent selector's Continue button is * selected by the user. */ continueCommand: Action; /** * The map to display the selector on. */ maps: MapsLike; } /** * Arguments for the "map.export-image" operation. */ export interface ExportMapImageArgs { /** * The name of the file to export to. */ fileName?: string; /** * If true, then the file will be stored permanently in a user accessible * directory. If false, a temporary file will be created. */ keepFile?: boolean; /** * The map to export. If more than one map is specified, the first will be * used. If no maps are specified, a default will be used. */ maps?: MapsLike; } /** * Arguments for the "map.hide" operation. */ export interface HideMapArgs { /** * Whether or not to show a spinner while the map is hidden. */ showSpinner: boolean; /** * The map to hide. */ maps: MapsLike; } /** * Arguments for the "map.rotate-by" and "map.rotate-to" commands. */ export interface MapRotateArgs { /** * The number of degrees clock-wise, with North being 0 degrees. */ rotation: number; /** * The map to rotate. */ maps?: MapsLike; } /** * Arguments for the "map.replace*" operations. */ export interface ReplaceMapArgs { /** * The map with which to replace the current map. */ replacementMap: EsriMap; /** * The MapExtension in which to replace the map. */ mapExtension: MapExtension; } /** * Arguments for the "map.set-view-mode" command. */ export interface SetViewModeArgs extends HasMaps { /** * The new view mode for the specified map(s). */ viewMode: ViewMode; } /** * Arguments for the "map.start-sketch" operation. */ export interface StartSketchArgs { /** * The map to sketch on. */ maps: MapsLike; /** * The geometry to edit. */ geometry: GeometryUnion; /** * The type of geometry to edit. */ geometryType: GeometryJsonType; /** * Gets a resume ID for the sketch. Cannot be set. */ resumeId: string; /** * The size of the buffer to be created around the geometry. If null or a * negative value, no buffer will be created. * * This is currently only supported for line geometry types. */ bufferSize: number; /** * Whether the previous geometry editor settings should be restored after * this sketch is stopped. */ retainEditorSettings: boolean; /** * The settings to be applied to the sketch. */ editorSettings: GeometryEditorSettings; /** * The maximum number of segments permitted for a polyline or polygon * sketch. Default is no limit. Mobile only. */ maxSegments?: number; /** * An optional symbol to use. */ symbol?: SymbolJson; } /** * Result of the "map.get-coordinate-transformation" operation. */ export interface CoordinateTransformation { /** * The initial coordinate system of the data. */ inputSpatialReference: SpatialReference; /** * The coordinate system to project the data into. */ outputSpatialReference: SpatialReference; /** * The geographic transformation used to project data between the input * coordinate system and the output coordinate system. */ transformation: GeographicTransformation; } /** * A result geometry which also indicates which map it came from. */ export interface HasMapGeometry { /** * The map(s) to target. */ maps?: MapsLike; /** * The geometry to target. */ geometry?: GeometryLike; } /** * Event args for the map.switched event. */ export interface MapSwitchedEvent extends MapEvent { /** * The previous map. */ oldMap: EsriMap; } /** * Event args for the map.initialized event. */ export interface MapInitializedEvent extends MapEvent { /** * The amount of time that the map took to load. Mobile only. */ loadTime: TimeSpan; } /** * Event args for the map.markup-added event. */ export interface MarkupAddedEvent extends MapEvent { /** * The markup type of the added markup. */ markupType: MarkupType; } /** * The type of markup. */ export type MarkupType = "Unknown" | "Polygon" | "Polyline" | "Text" | "PictureMarker" | "PictureFill" | "Composite" | "Multi"; /** * A slot on the map in which elements can be placed. Mobile only. */ export type MapSlot = "top" | "top-left" | "top-right" | "bottom" | "bottom-right" | "bottom-left" | "visible-top-center" | "visible-bottom-center"; /** * Arguments for the "map.show-widgets" command. */ export interface ShowWidgetsArgs { /** * A token identifying the caller that is requesting the slots be shown. */ callerName?: string; } /** * Arguments for the "map.hide-widgets" command. */ export interface HideWidgetsArgs { /** * A token identifying the caller that is requesting the slots be hidden. */ callerName?: string; /** * Slots that will not be hidden. */ ignoreSlots?: MapSlot[]; } /** * Arguments for the "map.show-context-menu" command. */ export interface ShowContextMenuArgs extends HasMaps { /** * The location at which to show the context menu. */ geometry: GeometryUnion; } /** * Result of the "map.get-sketch-info" operation. */ export interface SketchInfo { /** * The current geometry of the sketch. */ geometry: GeometryUnion; /** * Whether the geometry has been manually edited. */ isManualSelection: boolean; } export declare class MapCommands extends CommandRegistry { protected readonly _prefix = "map"; /** * Adds markup to the map(s). * * **Example:** Adding markup to a custom collection using `AddMarkupArgs`. * In Mobile, the Graphic's symbol must use the formatting from Esri's Web * Map specification: * https://developers.arcgis.com/web-map-specification/objects/symbol/ . * * ``` * [ * { * name: "map.add-markup", * arguments: { * collection: "poi-highlights", * maps: "item://map-extension/your-mapExtension-id", * graphics: [ * { * geometry: { * type: "point", * x: -13733818, * y: 6176951, * spatialReference: { * wkid: 3857, * }, * }, * symbol: { * type: "simple-marker", * style: "circle", * color: [0, 120, 212, 200], * size: 16, * outline: { * color: [255, 255, 255, 255], * width: 2, * }, * }, * }, * ], * }, * }, * ]; * ``` */ get addMarkup(): Command; /** * Add the specified layer(s) to the maps(s). Layers will be inserted in the * order specified and will be added above existing layers in the drawing * order. Note that an Esri `Layer` object can only be added to one map. * * Web only. * * **Example:** Adding a CSV layer to the main map using `AddLayersArgs`. * * ``` * [ * { * name: "map.add-layers", * arguments: { * layers: [ * { * id: "your-layer-id", * layerType: "CSV", * title: "Earthquakes", * url: "http://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/2.5_month.csv", * columnDelimiter: ",", * locationInfo: { * locationType: "coordinates", * latitudeFieldName: "latitude", * longitudeFieldName: "longitude", * }, * layerDefinition: { * geometryType: "esriGeometryPoint", * objectIdField: "__OBJECTID", * capabilities: "Query", * extent: { * xmin: -20034970.25849882, * ymin: -9494815.985282788, * xmax: 20026086.963133518, * ymax: 14269743.874052156, * spatialReference: { * wkid: 102100, * }, * }, * }, * }, * ], * }, * }, * ]; * ``` * * @webOnly */ get addLayers(): Command; /** * Applies a Filter Effect to the map(s). Web only. * * **Example:** Applying a filter effect to a layer with a specific id. * * ``` * [ * { * name: "map.apply-filter-effect", * arguments: { * layers: "your-layer-id", * where: "Magnitude >= 6.0", * featureMode: "replace", * maps: "item://map-extension/your-mapExtension-id", * includedEffect: { * brightness: "130%", * contrast: "120%", * }, * excludedEffect: { * grayscale: "100%", * opacity: "25%", * }, * }, * }, * ]; * ``` * * @webOnly */ get applyFilterEffect(): Command; /** * Applies a LayerPreset to the map(s). Web only. * * **Example:**: Applying a defined layer preset. * * ``` * [ * { * name: "map.apply-layer-preset", * arguments: { * layerPreset: "item://layer-preset/your-layerPreset-id", * maps: "item://map-extension/your-mapExtension-id", * }, * }, * ]; * ``` * * @webOnly */ get applyLayerPreset(): Command; /** * Create a map note. Web only. * * **Example:** Creating a map note based on the user-defined coordinates. * * ``` * [ * { * name: "map.get-user-coordinates-input", * arguments: { * completeLabel: "language-common-next", * attributes: { * slot: "top-start", * }, * }, * }, * "tasks.identify", * { * name: "map.create-note", * arguments: { * attributes: { * slot: "top-start", * }, * }, * }, * ]; * ``` * * @webOnly */ get createNote(): Command; /** * Edit an existing map note. Web only. * * **Example:** Editing a map note based on the user-defined coordinates. * * ``` * [ * { * name: "map.get-user-coordinates-input", * arguments: { * completeLabel: "language-common-next", * attributes: { * slot: "top-start", * }, * }, * }, * "tasks.identify", * { * name: "map.edit-note", * arguments: { * attributes: { * slot: "top-start", * }, * }, * }, * ]; * ``` * * @webOnly */ get editNote(): Command; /** * Removes a Filter Effect(s) from the map(s). Web only. * * **Example:** Removing a filter effect from a layer with a specific id. * * ``` * [ * { * name: "map.remove-filter-effects", * arguments: { * layers: "your-layer-id", * maps: "item://map-extension/your-mapExtension-id", * }, * }, * ]; * ``` * * @webOnly */ get removeFilterEffects(): Command; /** * Clears all Filter Effects from the map(s). Web only. * * **Example:** Clearing all filter effects from the default map in a map * extension. * * ``` * [ * { * name: "map.clear-filter-effects", * arguments: "item://map-extension/your-mapExtension-id", * }, * ]; * ``` * * @webOnly */ get clearFilterEffects(): Command; /** * Clears all markup from the map(s). * * **Example:** Clearing all markup from a custom collection on the default * map in a map extension. * * ``` * [ * { * name: "map.clear-markup", * arguments: { * collection: "poi-highlights", * maps: "item://map-extension/your-mapExtension-id", * }, * }, * ]; * ``` */ get clearMarkup(): Command; /** * Disables the click event handler on the map, so that if the user clicks * on the map, the configured handler will not be invoked. Mobile only. * * @mobileOnly */ get disableMapClick(): Command; /** * Displays a square overlay on the map that allows the user to change the * map extent within the overlay. Mobile only. * * @mobileOnly */ get displayExtentSelector(): Command; /** * Enables the click event handler on the map, so that if the user clicks on * the map, the configured handler will be invoked. Mobile only. * * @mobileOnly */ get enableMapClick(): Command; /** * Zooms to (without animation) one or many features on the targeted map(s). * Web only. * * @webOnly */ get goToFeatures(): Command; /** * Zooms to (without animation) one or many geometries on the targeted * map(s). Web only. * * @webOnly */ get goToGeometry(): Command; /** * Zooms to (without animation) the next viewpoint to undo viewpoint changes * from zooming to a previous viewpoint. * * Note that if no map is included as an argument, the command will run for * all maps, which could result in unexpected behavior. Web only. * * @webOnly */ get goToNextViewpoint(): Command; /** * Zooms to (without animation) the previous viewpoint. * * Note that if no map is included as an argument, the command will run for * all maps, which could result in unexpected behavior. Web only. * * @webOnly */ get goToPreviousViewpoint(): Command; /** * Zooms to (without animation) the given viewpoint. Web only. * * @webOnly */ get goToViewpoint(): Command; /** * Zooms (without animation) the map to a specified, numerical scale. Web * only. * * @webOnly */ get goToScale(): Command; /** * Zooms (without animation) the map to its initial viewpoint. If map is * omitted, all maps will be targeted. Web only. * * @webOnly */ get goToInitialViewpoint(): Command; /** * Go to (without animation) the full extent of the layer(s). If more than * one layer is specified, it will zoom to the combined extent of all * layers. Web only. * * @webOnly */ get goToLayerExtent(): Command; /** * Hides the extent selector overlay on the map. Mobile only. * * @mobileOnly */ get hideExtentSelector(): Command; /** * Hides (closes) any currently open context menu. Mobile only. * * @mobileOnly */ get hideContextMenu(): Command; /** * Hides the components contained within the map's slots. If a caller name * is supplied, the slots stay hidden until every caller that hid them has * shown them again. Mobile only. * * @mobileOnly */ get hideWidgets(): Command; /** * Show the specified markup collection, if hidden. If no collection is * specified the default markup collection will be shown. Web only. * * **Example:** Hiding a custom collection using `MarkupArgs`. * * ``` * [ * { * name: "map.hide-markup", * arguments: { * collection: "poi-highlights", * maps: "item://map-extension/your-mapExtension-id", * }, * }, * ]; * ``` * * @webOnly */ get hideMarkup(): Command; /** * Pans (without zooming) to one or many features on the targeted map(s). */ get panToFeatures(): Command; /** * Pan (without zooming) to one or many geometries on the targeted map(s). * Web only. * * @webOnly */ get panToGeometry(): Command; /** * Pan (without zooming) to one or many geometries on the targeted map(s). * Mobile only. * * @mobileOnly */ get panToGeometries(): Command; /** * Pauses sketching on the map. Stores the current sketch editor and * geometry for later use. Mobile only. * * @mobileOnly */ get pauseSketch(): Command; /** * Remove the specified layer(s) from the map(s). Web only. * * **Example:** Removing a layer with a specific id from the main map using * `RemoveLayersArgs`. * * ``` * [ * { * name: "map.remove-layers", * arguments: { * maps: "item://map-extension/your-mapExtension-id", * layers: [ * { * id: "your-layer-id", * }, * ], * }, * }, * ]; * ``` * * @webOnly */ get removeLayers(): Command; /** * Replaces the entire current map in the MapExtension and in the map * component with a different map. Mobile only. * * @mobileOnly */ get replace(): Command; /** * Replaces the additional layers on top of an mmpk with a new set of * layers, when using mmpk + WebMap. The mmpk part of the map is retained. * Mobile only. * * @mobileOnly */ get replaceAdditionalLayers(): Command; /** * Replaces the underlying mmpk part of the map when using mmpk + WebMap. * The additional layers on top of the mmpk data are retained. Mobile only. * * @mobileOnly */ get replaceMmpk(): Command; /** * Resumes sketching on the map. Uses the sketch editor and geometry stored * when pausing. Mobile only. * * @mobileOnly */ get resumeSketch(): Command; /** * Rotates the map by the specified amount. * * **Example:** Rotating a map by 90 degrees with the defined id using * `MapRotateArgs`. * * ``` * [ * { * name: "map.rotate-by", * arguments: { * rotation: 90, * maps: "item://map-extension/your-mapExtension-id", * }, * }, * ]; * ``` */ get rotateBy(): Command; /** * Rotates the map to the specified angle. * * **Example:** Rotating a map to 45 degrees with the defined id using * `MapRotateArgs`. * * ``` * [ * { * name: "map.rotate-to", * arguments: { * rotation: 45, * maps: "item://map-extension/your-mapExtension-id", * }, * }, * ]; * ``` */ get rotateTo(): Command; /** * Refreshes / reloads the map. Mobile only. * * @mobileOnly */ get refresh(): Command; /** * Changes the view mode of a map to the specified mode, if supported. If no * maps are specified, all maps will be targeted. Web only. * * **Example:** Setting the view mode to "scene" on a map with the defined * id using `SetViewModeArgs`. * * ``` * [ * { * name: "map.set-view-mode", * arguments: { * viewMode: "scene", * maps: "item://map-extension/your-mapExtension-id", * }, * }, * ]; * ``` * * @webOnly */ get setViewMode(): Command; /** * Show the specified markup collection, if hidden. If no collection is * specified the default markup collection will be shown. Web only. * * **Example:** Showing a custom collection using `MarkupArgs`. * * ``` * [ * { * name: "map.show-markup", * arguments: { * collection: "poi-highlights", * maps: "item://map-extension/your-mapExtension-id", * }, * }, * ]; * ``` * * @webOnly */ get showMarkup(): Command; /** * Shows a context menu at the given location on the map. Mobile only. * * @mobileOnly */ get showContextMenu(): Command; /** * Shows the components contained within the map's slots. If a caller name * is supplied, the slots are only shown once every caller that hid them has * shown them again. Mobile only. * * @mobileOnly */ get showWidgets(): Command; /** * Updates a layer in the map. Web only. * * **Example:** Updating a layer with a specific id using `UpdateLayerArgs`. * * ``` * [ * { * name: "map.update-layer", * arguments: { * layers: "your-layer-id", * maps: "item://map-extension/your-mapExtension-id", * layerJson: { * layerType: "CSV", * title: "Test-Update", * opacity: 0.3, * }, * }, * }, * ]; * ``` * * @webOnly */ get updateLayer(): Command; /** * Zooms to one or many features. */ get zoomToFeatures(): Command; /** * Zooms to one or many geometries. Web only. * * @webOnly */ get zoomToGeometry(): Command; /** * Zooms the map in by one level of detail. Web only. * * **Example:** Zooming in on a map with the defined id using `Maps` as an * argument. * * ``` * [ * { * name: "map.zoom-in", * arguments: { * maps: "item://map-extension/your-mapExtension-id", * }, * }, * ]; * ``` * * @webOnly */ get zoomIn(): Command; /** * Zooms the map out by one level of detail. Web only. * * **Example:** Zooming out on a map with the defined id using `Maps` as an * argument. * * ``` * [ * { * name: "map.zoom-out", * arguments: { * maps: "item://map-extension/your-mapExtension-id", * }, * }, * ]; * ``` * * @webOnly */ get zoomOut(): Command; /** * Zooms the map to a specified, numerical scale. Web only. * * **Example:** Zooming to a scale of 1:500 on a map with the defined id. * * ``` * [ * { * name: "map.zoom-to-scale", * arguments: { * scale: 500, * maps: "item://map-extension/your-mapExtension-id", * }, * }, * ]; * ``` * * @webOnly */ get zoomToScale(): Command; /** * Zooms the map to its initial viewpoint. * * **Example:** Zooming to the initial viewpoint on a map with the defined * id using `Maps` as an argument. * * ``` * [ * { * name: "map.zoom-to-initial-viewpoint", * arguments: { * maps: "item://map-extension/your-mapExtension-id", * }, * }, * ]; * ``` */ get zoomToInitialViewpoint(): Command; /** * Zooms to the next viewpoint to undo viewpoint changes from zooming to a * previous viewpoint. * * Note that if no map is included as an argument, the command will run for * all maps, which could result in unexpected behavior. Web only. * * **Example:** Zooming to the next viewpoint on a map with the defined id * using `Maps` as an argument. * * ``` * [ * { * name: "map.zoom-to-next-viewpoint", * arguments: { * maps: "item://map-extension/your-mapExtension-id", * }, * }, * ]; * ``` * * @webOnly */ get zoomToNextViewpoint(): Command; /** * Zooms to the previous viewpoint. * * Note that if no map is included as an argument, the command will run for * all maps, which could result in unexpected behavior. Web only. * * **Example:** Zooming to the previous viewpoint on a map with the defined * id using `Maps` as an argument. * * ``` * [ * { * name: "map.zoom-to-previous-viewpoint", * arguments: { * maps: "item://map-extension/your-mapExtension-id", * }, * }, * ]; * ``` * * @webOnly */ get zoomToPreviousViewpoint(): Command; /** * Go to the given viewpoint. * * **Example:** Zooming to a viewpoint with the defined target geometry, * rotation, and scale on a map with the defined id. * * ``` * [ * { * name: "map.zoom-to-viewpoint", * arguments: { * viewpoint: { * scale: 72224, * rotation: 30, * targetGeometry: { * x: -122.4194, * y: 37.7749, * spatialReference: { * wkid: 4326, * }, * }, * }, * maps: "item://map-extension/your-mapExtension-id", * }, * }, * ]; * ``` */ get zoomToViewpoint(): Command; /** * Go to the full extent of the layer(s). If more than one layer is * specified, it will zoom to the combined extent of all layers. Web only. * * **Example:** Zooming to the full extent of a layer with the defined id on * a map with the defined id. * * ``` * [ * { * name: "map.zoom-to-layer-extent", * arguments: { * layers: "your-layer-id", * maps: "item://map-extension/your-mapExtension-id", * }, * }, * ]; * ``` * * @webOnly */ get zoomToLayerExtent(): Command; /** * Go to the closest min/max scale of the layer. The map will not zoom if it * is currently within the visible scale range. If multiple layers are * provided, it will attempt to zoom to a scale range that makes all of the * layers visible. If this is not possible (i.e. some of the layers' scale * ranges don't overlap), then priority will be given to layers that come * earlier in the sequence. Web only. * * **Example:** Zooming to the visible scale of a layer with the defined id * on a map with the defined id. * * ``` * [ * { * name: "map.zoom-to-layer-visible-scale", * arguments: { * layers: "your-layer-id", * maps: "item://map-extension/your-mapExtension-id", * }, * }, * ]; * ``` * * @webOnly */ get zoomToLayerVisibleScale(): Command; } export declare class MapEvents extends EventRegistry { protected readonly _prefix = "map"; /** * Raised when a map has completed initialization. MapEvent used in Web, * MapInitializedEvent used in Mobile. */ get initialized(): Event; /** * Raised when a map is about to begin loading during startup. The map can * be swapped with a different map at this point if you want to circumvent * the map load process. For example in an app that supported offline, an * offline map could be swapped in here. Mobile only. * * @mobileOnly */ get initializing(): Event; /** * Raised when markup is added to the map. Mobile only. * * @mobileOnly */ get markupAdded(): Event; /** * Raised when markup is cleared from the map. Mobile only. * * @mobileOnly */ get markupCleared(): Event; /** * Raised when the a map navigation (eg. Pan or zoom) is complete. Mobile * only. * * @mobileOnly */ get navigationCompleted(): Event; /** * Raised when a map refresh completes. Mobile only. * * @mobileOnly */ get refreshed(): Event; /** * Raised when a map refresh begins. Mobile only. * * @mobileOnly */ get refreshing(): Event; /** * Raised when the Rotate operation has completed execution. Mobile only. * * @mobileOnly */ get rotated(): Event; /** * Raised when the Rotate operation is about to be called. Mobile only. * * @mobileOnly */ get rotating(): Event; /** * Raised when a map is replaced with a different map. Mobile only. * * @mobileOnly */ get switched(): Event; /** * Raised when a map's {@link ViewMode} is changed. This happens when the map * view is changed between a WebMap and a WebScene. Web only. * * @webOnly */ get viewModeChanged(): Event; /** * Raised when the a map extent is changed. This event is raised in * extremely high frequency - for example, every few pixels the map is * repositioned during a pan. */ get viewpointChanged(): Event; /** * Raised when a map export operation has completed. Mobile only. * * @mobileOnly */ get imageExported(): Event; } export declare class MapOperations extends OperationRegistry { protected readonly _prefix = "map"; /** * Prompts the user to enter and return a coordinate. Web only. * * @webOnly */ get getUserCoordinatesInput(): Operation; /** * If a map extension ID is specified, returns the coordinate transformation * object for that map. If no map extension ID is specified, returns the * coordinate transformation object of the first available map. The * coordinate transformation object contains information about the input and * output spatial reference, as well as the necessary transformations to * convert between those coordinate systems. Mobile only. * * @mobileOnly */ get getCoordinateTransformation(): Operation; /** * Exports the currently rendered map to a png image file on disk, and also * returns that image. Mobile only. * * @mobileOnly */ get exportImage(): Operation; /** * Exports the current configuration of the selected map component as a web * map or scene. Web only. * * @webOnly */ get exportWebMapOrScene(): Operation; /** * Returns markup from the specified map that are intersected by the * supplied geometry. Web only. * * @webOnly */ get getMarkup(): Operation; /** * Returns the extent from the specified map. Web only. * * @webOnly */ get getExtent(): Operation; /** * Returns the geometry that is contained within the square overlay of the * extent selector. Mobile only. * * @mobileOnly */ get getGeometryFromSelector(): Operation; /** * Returns information about the sketch on the map, including the sketch's * geometry and whether it was manually edited. Mobile only. * * @mobileOnly */ get getSketchInfo(): Operation; /** * Returns the initial viewpoint for the active map or scene of the * specified map. If no map extension is specified, returns the initial * viewpoint for the first available map. Also returns the map(s) used for * the operation. Web only. * * @webOnly */ get getInitialViewpoint(): Operation; /** * Returns the current viewpoint for the active map or scene of the * specified map. If no map extension is specified, returns the viewpoint * for the first available map. Also returns the map(s) used for the * operation. Web only. * * @webOnly */ get getViewpoint(): Operation; /** * If a map extension ID is specified, returns the spatial reference for * that map. If no map extension ID is specified, returns the spatial * reference of the first available map. */ get getSpatialReference(): Operation; /** * Returns the point at the center of the visible map area. Accounts for * panels displaying overtop of the map. Mobile only. * * @mobileOnly */ get getVisibleCenter(): Operation; /** * Hides the map. Mobile only. * * @mobileOnly */ get hide(): Operation; /** * Shows the map if it is hidden. Mobile only. * * @mobileOnly */ get show(): Operation; /** * Enables sketching on a map. Mobile only. * * @mobileOnly */ get startSketch(): Operation; /** * Stops sketching on the map. Mobile only. * * @mobileOnly */ get stopSketch(): Operation; /** * Returns the amount of the map that is currently covered by insets such as * the panel component. Mobile only. * * @mobileOnly */ get getViewInsets(): Operation; }