labelPointOperator

AMD: require(["esri/geometry/operators/labelPointOperator"], (labelPointOperator) => { /* code goes here */ });
ESM: import * as labelPointOperator from "@arcgis/core/geometry/operators/labelPointOperator.js";
Object: esri/geometry/operators/labelPointOperator
Since: ArcGIS Maps SDK for JavaScript 4.31

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

Property
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

Method
execute(geometry){Point}

Performs the label point operation on the geometry.

Parameter
geometry GeometryUnion

The input geometry.

Returns
Type Description
Point Returns the label point.
Example
// Perform the label point operation
const labelPoint = labelPointOperator.execute(polygon);

executeMany

Method
executeMany(geometries){Point[]}

Performs the label point operation on the geometry set.

Parameter
geometries GeometryUnion[]

The set of input geometries. All the geometries must have the same spatial reference.

Returns
Type Description
Point[] Returns the label points for each geometry.

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.