Show / Hide Table of Contents

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
System.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

point is null.

System.ArgumentException

point has an incompatible spatial reference.

Applies to

Platforms and versions
TargetVersions
.NET Standard 2.0100.3 - 200.7
.NET100.13 - 200.7
.NET Windows100.13 - 200.7
.NET Android200.0 - 200.7
.NET iOS200.0 - 200.7
.NET Framework100.0 - 200.7
Xamarin.Android100.0 - 100.15
Xamarin.iOS100.0 - 100.15
UWP100.0 - 200.7

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
System.Double x

The x coordinate of the new point.

System.Double y

The y coordinate of the new point

Returns
Type Description
System.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
TargetVersions
.NET Standard 2.0100.3 - 200.7
.NET100.13 - 200.7
.NET Windows100.13 - 200.7
.NET Android200.0 - 200.7
.NET iOS200.0 - 200.7
.NET Framework100.0 - 200.7
Xamarin.Android100.0 - 100.15
Xamarin.iOS100.0 - 100.15
UWP100.0 - 200.7

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
System.Double x

The x coordinate of the new point.

System.Double y

The y coordinate of the new point.

System.Double z

The z coordinate of the new point.

Returns
Type Description
System.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
TargetVersions
.NET Standard 2.0100.3 - 200.7
.NET100.13 - 200.7
.NET Windows100.13 - 200.7
.NET Android200.0 - 200.7
.NET iOS200.0 - 200.7
.NET Framework100.0 - 200.7
Xamarin.Android100.0 - 100.15
Xamarin.iOS100.0 - 100.15
UWP100.0 - 200.7
In This Article
Back to top Copyright © 2022 Esri.