@arcgis/core
Version:
ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API
80 lines (78 loc) • 3.45 kB
TypeScript
import type Collection from "../core/Collection.js";
import type FocusAreaOutline from "./FocusAreaOutline.js";
import type Polygon from "../geometry/Polygon.js";
import type { Clonable } from "../core/Clonable.js";
import type { JSONSupportMixin } from "../core/JSONSupport.js";
import type { FocusAreaOutlineProperties } from "./FocusAreaOutline.js";
import type { PolygonProperties } from "../geometry/Polygon.js";
import type { ReadonlyArrayOrCollection } from "../core/Collection.js";
export interface FocusAreaProperties extends Partial<Pick<FocusArea, "enabled" | "id" | "title">> {
/**
* The geometries defining the focused area.
*
* The focus area geometries are defining the 2D map areas which are in focus, Z values are ignored.
*
* > [!WARNING]
* >
* > **Known Limitations**
* >
* > [Polygon](https://developers.arcgis.com/javascript/latest/references/core/geometry/Polygon/) is the only supported geometry type.
*/
geometries?: ReadonlyArrayOrCollection<PolygonProperties>;
/**
* An object describing the style of the focus area outline.
*
* This property can be an instance of [FocusAreaOutline](https://developers.arcgis.com/javascript/latest/references/core/effects/FocusAreaOutline/), or nil if no outline is desired.
*/
outline?: FocusAreaOutlineProperties | null;
}
/**
* Represents a single focus area.
*
* A focus area highlights a region of the map by de-emphasizing parts outside the area of interest. Focus areas can
* have an optional outline with a configurable color. Focus areas are added to
* [Map.focusAreas](https://developers.arcgis.com/javascript/latest/references/core/Map/#focusAreas).
*
* A focus area is defined by its geometries, which are a collection of [polygons](https://developers.arcgis.com/javascript/latest/references/core/geometry/Polygon/).
*
* @since 4.33
* @see [FocusAreas](https://developers.arcgis.com/javascript/latest/references/core/effects/FocusAreas/)
*/
export default class FocusArea extends FocusAreaSuperclass {
constructor(properties?: FocusAreaProperties);
/**
* A boolean indicating whether the focus area is enabled and displayed.
*
* @default true
*/
accessor enabled: boolean;
/**
* The geometries defining the focused area.
*
* The focus area geometries are defining the 2D map areas which are in focus, Z values are ignored.
*
* > [!WARNING]
* >
* > **Known Limitations**
* >
* > [Polygon](https://developers.arcgis.com/javascript/latest/references/core/geometry/Polygon/) is the only supported geometry type.
*/
get geometries(): Collection<Polygon>;
set geometries(value: ReadonlyArrayOrCollection<PolygonProperties>);
/**
* The unique ID assigned to the focus area.
*
* It is automatically generated when the focus area is created, and can be overwritten by the developer.
*/
accessor id: string;
/**
* An object describing the style of the focus area outline.
*
* This property can be an instance of [FocusAreaOutline](https://developers.arcgis.com/javascript/latest/references/core/effects/FocusAreaOutline/), or nil if no outline is desired.
*/
get outline(): FocusAreaOutline | null | undefined;
set outline(value: FocusAreaOutlineProperties | null | undefined);
/** The title of the focus area. */
accessor title: string | null | undefined;
}
declare const FocusAreaSuperclass: typeof Clonable & typeof JSONSupportMixin