Show / Hide Table of Contents

Method AddPoint

AddPoint(MapPoint)

Adds a new point to the end of the last part of the multipart.

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 new point

Remarks

If there are no parts then an initial part is created and the point added to that. The point becomes the end point of a line segment in the part.

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
Relevant samples
Identify graphics: Display an alert message when a graphic is clicked.
Show location history: Display your location history on the map.

AddPoint(Double, Double)

Adds a new point to the end of the last part of the multipart.

Declaration
public int AddPoint(double x, double y)
Parameters
Type Name Description
System.Double x

The x-coordinate of the point to add.

System.Double y

The y-coordinate of the point to add.

Returns
Type Description
System.Int32

The index of the new point

Remarks

If there are no parts then an initial part is created and the point added to that. The point becomes the end point of a line segment in the part.

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)

Adds a new point to the end of the last part of the multipart.

Declaration
public int AddPoint(double x, double y, double z)
Parameters
Type Name Description
System.Double x

The x-coordinate of the point to add.

System.Double y

The y-coordinate of the point to add.

System.Double z

The z-coordinate of the point to add.

Returns
Type Description
System.Int32

The index of the new point

Remarks

If there are no parts then an initial part is created and the point added to that. The point becomes the end point of a line segment in the part.

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.