require(["esri/geometry/operators/clipOperator"], (clipOperator) => { /* code goes here */ });
import * as clipOperator from "@arcgis/core/geometry/operators/clipOperator.js";
esri/geometry/operators/clipOperator
Clips geometries with a 2D extent.
Property Overview
Name | Type | Summary | Object |
---|---|---|---|
Indicates if the operator supports input geometries that contain curves. | clipOperator |
Property Details
-
supportsCurves
supportsCurves Booleanreadonly
-
Indicates if the operator supports input geometries that contain curves.
- Default Value:true
Method Overview
Name | Return Type | Summary | Object |
---|---|---|---|
Perform the clip operation on the input geometry. | clipOperator | ||
Perform the clip operation on the input geometries. | clipOperator |
Method Details
-
execute
execute(geometry, extent){GeometryUnion |null |undefined}
-
Perform the clip operation on the input geometry.
Parametersgeometry GeometryUnionThe geometry to be clipped.
extent ExtentThe extent used to clip the geometry.
ReturnsType Description GeometryUnion | null | undefined Returns the clipped geometry or null. Example// return a new geometry of a polygon clipped by the view's extent const clippedGeometry = clipOperator.execute(polygon, view.extent);
-
executeMany
executeMany(geometries, extent){Array<(GeometryUnion|null|undefined)>}
-
Perform the clip operation on the input geometries.
Parametersgeometries GeometryUnion[]The array of geometries to be clipped. All the geometries must have the same spatial reference.
extent ExtentThe extent used to clip the geometries.
ReturnsType Description Array<(GeometryUnion|null|undefined)> Returns an array whose elements may either be clipped geometries or null.