require(["esri/geometry/operators/labelPointOperator"], (labelPointOperator) => { /* code goes here */ });
import * as labelPointOperator from "@arcgis/core/geometry/operators/labelPointOperator.js";
esri/geometry/operators/labelPointOperator
Calculates a label point for the given 2D geometries. The point can be used to place a label on a feature and help to ensure readability on the map. The point is guaranteed to be on the interior of a geometry.
Property Overview
Name | Type | Summary | Object |
---|---|---|---|
Indicates if the operator supports input geometries that contain curves. | labelPointOperator |
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 |
---|---|---|---|
Performs the label point operation on the geometry. | labelPointOperator | ||
Performs the label point operation on the geometry set. | labelPointOperator |
Method Details
-
execute
execute(geometry){Point}
-
Performs the label point operation on the geometry.
Parametergeometry GeometryUnionThe input geometry.
ReturnsType Description Point Returns the label point. Example// Perform the label point operation const labelPoint = labelPointOperator.execute(polygon);
-
Performs the label point operation on the geometry set.
Parametergeometries GeometryUnion[]The set of input geometries. All the geometries must have the same spatial reference.
Returns