Parameters
- geometry
- The polygon or envelope to label.
Return Value
Returns the label point for the geometry.
| Exception | Description |
|---|---|
| System.ArgumentNullException | Geometry is null. |
| System.NotImplementedException | The method is not implemented for GeometryBag. |
| System.ArgumentException | Geometry is not a polygon or an envelope. |
| ArcGIS.Core.Geometry.Exceptions.GeometryObjectException | Geometry is empty. |
{
// create a polygon
List<Coordinate2D> list2D =
[
new Coordinate2D(1.0, 1.0),
new Coordinate2D(1.0, 2.0),
new Coordinate2D(2.0, 2.0),
new Coordinate2D(2.0, 1.0),
];
polygon = PolygonBuilderEx.CreatePolygon(list2D);
bool isSimple = GeometryEngine.Instance.IsSimpleAsFeature(polygon);
MapPoint pt = GeometryEngine.Instance.LabelPoint(polygon);
}
Target Platforms: Windows 11 Home, Pro, Enterprise (64 bit)