Class MapPoint
Represents a location defined by x and y (and optionally z) coordinates.
Namespace: Esri.ArcGISRuntime.Geometry
Assembly: Esri.ArcGISRuntime.dll
Syntax
public class MapPoint : Geometry
Remarks
Map point geometries represent discrete locations or entities, such as a geocoded house address, the location of a water meter in a water utility network, or a moving vehicle. Larger geographic entities (such as cities) are often represented as map points on small-scale maps. Map points can be used as the geometry of features and graphics and are often used to construct more complex geometries. They are also used in a Viewpoint to define the center of the display.
Map points store a single set of x,y coordinates that define a location (longitude and latitude, for example), and a SpatialReference. Map points can optionally have a z-value (commonly used to describe elevation or altitude) and an m-value (commonly used for measurement relative to the geometry).
For map points defined with a geographic spatial reference, the x-coordinate is the longitude (east or west), and the y-coordinate is the latitude (north or south). When geographic coordinates are represented in strings, they are generally written using the form "(latitude, longitude)", where the y-coordinate comes before the x-coordinate. Latitude values south of the equator and longitude values west of the prime meridian are expressed as negative numbers.
Use CoordinateFormatter to convert a latitude and longitude formatted string directly to a map point. The coordinate formatter can also return a latitude and longitude formatted string from an existing map point. Other coordinate notations, such as Military Grid Reference System (MGRS) and United States National Grid (USNG) are also supported.
Map points are based upon the parent Geometry class. The geometry class is immutable which means that you can not change its shape once it is created. If you need to modify a map point once it has been created, use the MapPointBuilder class instead. The ToGeometry() method provides you with the map point object.
Constructors
Name | Description |
---|---|
MapPoint(Double, Double) | Initializes a new instance of the MapPoint class. |
MapPoint(Double, Double, SpatialReference) | Initializes a new instance of the MapPoint class. |
MapPoint(Double, Double, Double) | Initializes a new instance of the MapPoint class with an x, y, z and a
|
MapPoint(Double, Double, Double, SpatialReference) | Initializes a new instance of the MapPoint class with an x, y, z and spatial reference. |
Properties
Name | Description |
---|---|
Dimension | Gets the number of dimensions for the geometry. |
Extent | Gets the minimum enclosing envelope of the instance. |
GeometryType | Gets the geometry type. |
HasM | Gets a value indicating whether the geometry has an m-value. |
HasZ | Gets a value indicating whether the geometry has a z-value. |
IsEmpty | Gets a value indicating whether or not the geometry is empty. |
M | Gets the optional coordinate to define a measure value for the point. |
X | Gets the x-coordinate for the map point. |
Y | Gets the y-coordinate for the map point. |
Z | Gets the z-value for the map point. |
Methods
Name | Description |
---|---|
CreateWithM(Double, Double, Double) | Creates a new 2D map point with an m (measure) value. The spatial reference is |
CreateWithM(Double, Double, Double, SpatialReference) | Creates a new 2D map point with an m (measure) value and a spatial reference. |
CreateWithM(Double, Double, Double, Double) | Creates a new 3D map point with an x, y, z, and m (measure) coordinate. |
CreateWithM(Double, Double, Double, Double, SpatialReference) | Creates a new 3D map point with an x, y, z, m (measure) and a spatial reference. |
IsEqual(Geometry) | Compares two MapPoint for equality. This checks for a matching SpatialReference and coordinates for a match. |
ToString() | Returns a System.String that represents the current Object. |
Applies to
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 |