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

ArgumentException

point has an incompatible spatial reference.

Applies to

Platforms and versions
TargetVersions
.NET Standard 2.0100.3 - 100.15
.NET 6.0100.13 - 100.15
.NET 6.0 Windows100.13 - 100.15
.NET Framework100.0 - 100.15
.NET 5100.10 - 100.12
.NET Core 3.1100.7 - 100.12
Xamarin.Android100.0 - 100.15
Xamarin.iOS100.0 - 100.15
UWP100.0 - 100.15
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
Double x

The x-coordinate of the point to add.

Double y

The y-coordinate of the point to add.

Returns
Type Description
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 - 100.15
.NET 6.0100.13 - 100.15
.NET 6.0 Windows100.13 - 100.15
.NET Framework100.0 - 100.15
.NET 5100.10 - 100.12
.NET Core 3.1100.7 - 100.12
Xamarin.Android100.0 - 100.15
Xamarin.iOS100.0 - 100.15
UWP100.0 - 100.15

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

The x-coordinate of the point to add.

Double y

The y-coordinate of the point to add.

Double z

The z-coordinate of the point to add.

Returns
Type Description
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 - 100.15
.NET 6.0100.13 - 100.15
.NET 6.0 Windows100.13 - 100.15
.NET Framework100.0 - 100.15
.NET 5100.10 - 100.12
.NET Core 3.1100.7 - 100.12
Xamarin.Android100.0 - 100.15
Xamarin.iOS100.0 - 100.15
UWP100.0 - 100.15
In This Article
Back to top Copyright © 2022 Esri.