public void AddPart( IEnumerable<MapPoint> points )
Public Overloads Sub AddPart( _ ByVal points As IEnumerable(Of MapPoint) _ )
Parameters
- points
- An enumeration of points.
public void AddPart( IEnumerable<MapPoint> points )
Public Overloads Sub AddPart( _ ByVal points As IEnumerable(Of MapPoint) _ )
Exception | Description |
---|---|
System.ArgumentNullException | points is null. |
List<MapPoint> firstPoints = new List<MapPoint>(); firstPoints.Add(MapPointBuilderEx.CreateMapPoint(1.0, 1.0)); firstPoints.Add(MapPointBuilderEx.CreateMapPoint(1.0, 2.0)); firstPoints.Add(MapPointBuilderEx.CreateMapPoint(2.0, 2.0)); firstPoints.Add(MapPointBuilderEx.CreateMapPoint(2.0, 1.0)); List<MapPoint> nextPoints = new List<MapPoint>(); nextPoints.Add(MapPointBuilderEx.CreateMapPoint(11.0, 1.0)); nextPoints.Add(MapPointBuilderEx.CreateMapPoint(11.0, 2.0)); nextPoints.Add(MapPointBuilderEx.CreateMapPoint(12.0, 2.0)); nextPoints.Add(MapPointBuilderEx.CreateMapPoint(12.0, 1.0)); // use AttributeFlags.None since we have 2D points in the list PolylineBuilderEx pBuilder = new PolylineBuilderEx(firstPoints, AttributeFlags.None); pBuilder.AddPart(nextPoints); Polyline polyline = pBuilder.ToGeometry(); // polyline has 2 parts pBuilder.RemovePart(0); polyline = pBuilder.ToGeometry(); // polyline has 1 part
Target Platforms: Windows 11, Windows 10, Windows 8.1