UNPKG

@arcgis/core

Version:

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

68 lines (66 loc) 3.46 kB
import type Graphic from "../../Graphic.js"; import type PopupTemplate from "../../PopupTemplate.js"; import type Polygon from "../../geometry/Polygon.js"; import type { ClonableMixin } from "../../core/Clonable.js"; import type { JSONSupport } from "../../core/JSONSupport.js"; import type { BarrierType } from "./types.js"; import type { PolygonProperties } from "../../geometry/Polygon.js"; import type { PopupTemplateProperties } from "../../PopupTemplate.js"; export interface PolygonBarrierProperties extends Partial<Pick<PolygonBarrier, "barrierType" | "name">> { /** The point location of the barrier. */ geometry?: PolygonProperties | null; /** * The template for displaying content in a [Popup](https://developers.arcgis.com/javascript/latest/references/core/widgets/Popup/) when the graphic is selected. * * @since 4.30 */ popupTemplate?: PopupTemplateProperties | null; } /** * A polygon barrier to restrict travel along a street network when using a [RouteLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/RouteLayer/). * * @since 4.23 * @see [RouteParameters](https://developers.arcgis.com/javascript/latest/references/core/rest/support/RouteParameters/) * @see [RouteLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/RouteLayer/) */ export default class PolygonBarrier extends PolygonBarrierSuperclass { /** * Creates a [PolygonBarrier](https://developers.arcgis.com/javascript/latest/references/core/rest/support/PolygonBarrier/) from the parsed [Graphic](https://developers.arcgis.com/javascript/latest/references/core/Graphic/). * The method assumes that the graphic's attributes conform to the route layer item schema. * * @param graphic - A Graphic instance. * @returns A PolygonBarrier instance. * @since 4.24 */ static fromGraphic(graphic: Graphic): PolygonBarrier; constructor(properties?: PolygonBarrierProperties); /** * Use this parameter to specify polygons that either completely restrict travel or proportionately scale the time or * distance required to travel on the streets intersected by the polygons. * * @see [BarrierType](https://developers.arcgis.com/rest/services-reference/enterprise/route-sync-services.htm#GUID-7FF2A5FA-E884-46CC-9FBE-D8CEB49CAE7D) */ accessor barrierType: BarrierType | null | undefined; /** The point location of the barrier. */ get geometry(): Polygon | null | undefined; set geometry(value: PolygonProperties | null | undefined); /** The name of the barrier. */ accessor name: string | null | undefined; /** * The template for displaying content in a [Popup](https://developers.arcgis.com/javascript/latest/references/core/widgets/Popup/) when the graphic is selected. * * @since 4.30 */ get popupTemplate(): PopupTemplate | null | undefined; set popupTemplate(value: PopupTemplateProperties | null | undefined); get type(): "polygon-barrier"; /** * Creates a [Graphic](https://developers.arcgis.com/javascript/latest/references/core/Graphic/) from the [PolygonBarrier](https://developers.arcgis.com/javascript/latest/references/core/rest/support/PolygonBarrier/) instance. * The resulting graphic will have attributes that conform to the route layer item schema. * * @returns A Graphic instance. * @since 4.24 */ toGraphic(): Graphic; } declare const PolygonBarrierSuperclass: typeof JSONSupport & typeof ClonableMixin