Method AddPoint
AddPoint(MapPoint)
Add a new point to the end of the part. A new line segment will be added to connect the new point to the previous one.
Declaration
public int AddPoint(MapPoint point)
Parameters
| Type | Name | Description | 
|---|---|---|
| MapPoint | point | The point to add  | 
    
Returns
| Type | Description | 
|---|---|
| Int32 | The index of the added point  | 
    
Remarks
The points in the part are the start and end points of segments. A new line segment is added to connect the new point to the previous point. If this is the first point in an empty segment, a single closed segment is added using the same start and end point. Adding a second point will update this line segment to gain a distinct end point. Adding a third or more points will add new line segments.
Exceptions
| Type | Condition | 
|---|---|
| System.ArgumentNullException | 
  | 
    
| ArgumentException | 
  | 
    
Applies to
Platforms and versions
| Target | Versions | 
|---|---|
| .NET Standard 2.0 | 100.3 - 100.15 | 
| .NET 6.0 | 100.13 - 100.15 | 
| .NET 6.0 Windows | 100.13 - 100.15 | 
| .NET Framework | 100.0 - 100.15 | 
| .NET 5 | 100.10 - 100.12 | 
| .NET Core 3.1 | 100.7 - 100.12 | 
| Xamarin.Android | 100.0 - 100.15 | 
| Xamarin.iOS | 100.0 - 100.15 | 
| UWP | 100.0 - 100.15 | 
AddPoint(Double, Double)
Add a new point to the end of the part by specifying the points x,y coordinates. A new line segment will be added to connect the new point to the previous one.
Declaration
public int AddPoint(double x, double y)
Parameters
| Type | Name | Description | 
|---|---|---|
| Double | x | The x coordinate of the new point.  | 
    
| Double | y | The y coordinate of the new point  | 
    
Returns
| Type | Description | 
|---|---|
| Int32 | The index of the added point  | 
    
Remarks
The points in the part are the start and end points of segments. A new line segment is added to connect the new point to the previous point. If this is the first point in an empty segment, a single closed segment is added using the same start and end point. Adding a second point will update this line segment to gain a distinct end point. Adding a third or more points will add new line segments.
Applies to
Platforms and versions
| Target | Versions | 
|---|---|
| .NET Standard 2.0 | 100.3 - 100.15 | 
| .NET 6.0 | 100.13 - 100.15 | 
| .NET 6.0 Windows | 100.13 - 100.15 | 
| .NET Framework | 100.0 - 100.15 | 
| .NET 5 | 100.10 - 100.12 | 
| .NET Core 3.1 | 100.7 - 100.12 | 
| Xamarin.Android | 100.0 - 100.15 | 
| Xamarin.iOS | 100.0 - 100.15 | 
| UWP | 100.0 - 100.15 | 
AddPoint(Double, Double, Double)
Add a new point to the end of the part by specifying the points x,y,z coordinates. A new line segment will be added to connect the new point to the previous one.
Declaration
public int AddPoint(double x, double y, double z)
Parameters
| Type | Name | Description | 
|---|---|---|
| Double | x | The x coordinate of the new point.  | 
    
| Double | y | The y coordinate of the new point.  | 
    
| Double | z | The z coordinate of the new point.  | 
    
Returns
| Type | Description | 
|---|---|
| Int32 | The index of the added point  | 
    
Remarks
The points in the part are the start and end points of segments. A new line segment is added to connect the new point to the previous point. If this is the first point in an empty segment, a single closed segment is added using the same start and end point. Adding a second point will update this line segment to gain a distinct end point. Adding a third or more points will add new line segments.
Applies to
Platforms and versions
| Target | Versions | 
|---|---|
| .NET Standard 2.0 | 100.3 - 100.15 | 
| .NET 6.0 | 100.13 - 100.15 | 
| .NET 6.0 Windows | 100.13 - 100.15 | 
| .NET Framework | 100.0 - 100.15 | 
| .NET 5 | 100.10 - 100.12 | 
| .NET Core 3.1 | 100.7 - 100.12 | 
| Xamarin.Android | 100.0 - 100.15 | 
| Xamarin.iOS | 100.0 - 100.15 | 
| UWP | 100.0 - 100.15 |