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 List<Coordinate2D>(); list2D.Add(new Coordinate2D(1.0, 1.0)); list2D.Add(new Coordinate2D(1.0, 2.0)); list2D.Add(new Coordinate2D(2.0, 2.0)); list2D.Add(new Coordinate2D(2.0, 1.0)); Polygon polygon = PolygonBuilderEx.CreatePolygon(list2D); bool isSimple = GeometryEngine.Instance.IsSimpleAsFeature(polygon); MapPoint pt = GeometryEngine.Instance.LabelPoint(polygon);
Target Platforms: Windows 11, Windows 10