UNPKG

@arcgis/core

Version:

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

56 lines (54 loc) 2.63 kB
import type SimpleLineSymbol from "./SimpleLineSymbol.js"; import type Symbol from "./Symbol.js"; import type { SimpleLineSymbolProperties } from "./SimpleLineSymbol.js"; import type { SymbolProperties } from "./Symbol.js"; export interface FillSymbolProperties extends SymbolProperties { /** * The outline of the polygon. * * @example * let sym = { * type: "simple-fill", // autocasts as new SimpleFillSymbol() * color: "red", * outline: { // autocasts as new SimpleLineSymbol() * color: [128, 128, 128, 0.5], * width: "0.5px" * } * }; */ outline?: (SimpleLineSymbolProperties & { type?: "simple-line" }) | null; } /** * Fill symbols are used to draw [Polygon](https://developers.arcgis.com/javascript/latest/references/core/geometry/Polygon/) graphics in a * [GraphicsLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/GraphicsLayer/) or a [FeatureLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/FeatureLayer/) * in a 2D [MapView](https://developers.arcgis.com/javascript/latest/references/core/views/MapView/). To create new fill symbols, use either * [SimpleFillSymbol](https://developers.arcgis.com/javascript/latest/references/core/symbols/SimpleFillSymbol/) or [PictureFillSymbol](https://developers.arcgis.com/javascript/latest/references/core/symbols/PictureFillSymbol/). * * Fill symbols may also be used to symbolize 2D polygon features * in a 3D [SceneView](https://developers.arcgis.com/javascript/latest/references/core/views/SceneView/). However, it is * recommended you use [PolygonSymbol3D](https://developers.arcgis.com/javascript/latest/references/core/symbols/PolygonSymbol3D/) instead. * * @since 4.0 * @see [Symbol Builder](https://developers.arcgis.com/javascript/latest/symbol-builder/) * @see [Renderer](https://developers.arcgis.com/javascript/latest/references/core/renderers/Renderer/) * @see [Graphic](https://developers.arcgis.com/javascript/latest/references/core/Graphic/) */ export default abstract class FillSymbol extends Symbol { /** * The outline of the polygon. * * @example * let sym = { * type: "simple-fill", // autocasts as new SimpleFillSymbol() * color: "red", * outline: { // autocasts as new SimpleLineSymbol() * color: [128, 128, 128, 0.5], * width: "0.5px" * } * }; */ get outline(): SimpleLineSymbol | null | undefined; set outline(value: (SimpleLineSymbolProperties & { type?: "simple-line" }) | null | undefined); /** The symbol type. */ get type(): "simple-fill" | "picture-fill"; }