Parameters
- geometry
- The polygon or envelope to label.
Return Value
Returns the label point for the geometry.
Exception | Description |
---|---|
System.ArgumentNullException | Geometry is null or empty. |
System.NotImplementedException | The method is not implemented for GeometryBag. |
System.ArgumentException | Geometry is not a polygon or an envelope. |
// 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 = PolygonBuilder.CreatePolygon(list2D); bool isSimple = GeometryEngine.Instance.IsSimpleAsFeature(polygon); MapPoint pt = GeometryEngine.Instance.LabelPoint(polygon);
Target Platforms: Windows 10, Windows 8.1