ArcGIS Pro 3.8 API Reference Guide
ArcGIS.Core.Geometry Namespace / MapPointBuilderEx Class / CreateMapPoint Method / CreateMapPoint(Coordinate2D,SpatialReference) Method
Specifies the X and Y coordinates of the MapPoint.
(Optional) The SpatialReference. The default value is null.
Example

In This Topic
    CreateMapPoint(Coordinate2D,SpatialReference) Method
    In This Topic
    Convenience method to create a MapPoint instance with the given coordinates.
    Syntax
    Public Overloads Shared Function CreateMapPoint( _
       ByVal coordinate2D As Coordinate2D, _
       Optional ByVal spatialReference As SpatialReference _
    ) As MapPoint

    Parameters

    coordinate2D
    Specifies the X and Y coordinates of the MapPoint.
    spatialReference
    (Optional) The SpatialReference. The default value is null.
    Example
    Buffer many different Geometry Types
    {
      List<Coordinate2D> coords =
      [
        new Coordinate2D(1, 2), new Coordinate2D(3, 4), new Coordinate2D(4, 2),
        new Coordinate2D(5, 6), new Coordinate2D(7, 8), new Coordinate2D(8, 4),
        new Coordinate2D(9, 10), new Coordinate2D(11, 12), new Coordinate2D(12, 8),
        new Coordinate2D(10, 8), new Coordinate2D(12, 12), new Coordinate2D(14, 10)
      ];
    
      List<Geometry> manyGeometries =
      [
        MapPointBuilderEx.CreateMapPoint(coords[9]),
        PolylineBuilderEx.CreatePolyline([coords[0], coords[1], coords[2]], SpatialReferences.WGS84),
        PolylineBuilderEx.CreatePolyline([coords[3], coords[4], coords[5]]),
        PolygonBuilderEx.CreatePolygon([coords[6], coords[7], coords[8]])
      ];
    
      Geometry manyGeomBuffer = GeometryEngine.Instance.Buffer(manyGeometries, 0.25);
    }
    Requirements

    Target Platforms: Windows 11 Home, Pro, Enterprise (64 bit)

    ArcGIS Pro version: 3.0 or higher.
    See Also