ArcGIS Pro 3.0 API Reference Guide
ArcGIS.Core.Geometry Namespace / MapPointBuilderEx Class / MapPointBuilderEx Constructor / MapPointBuilderEx Constructor(Double,Double,Boolean,Double,Boolean,Double,Boolean,Int32,SpatialReference)
The X-value.
The Y-value.
If true, the Z-value is set and HasZ is true.
The Z-value which is used only if hasZ is true.
If true, the M-value is set and HasM is true.
The M-value which is used only if hasM is true.
If true, the ID value is set and HasID is true.
The ID-value which is used only if hasId is true.
(Optional) The SpatialReference. The default value is null.
Example

In This Topic
    MapPointBuilderEx Constructor(Double,Double,Boolean,Double,Boolean,Double,Boolean,Int32,SpatialReference)
    In This Topic
    Creates a new MapPointBuilderEx instance with the given X and Y coordinates and other attributes.
    Syntax
    Public Function New( _
       ByVal x As Double, _
       ByVal y As Double, _
       ByVal hasZ As Boolean, _
       ByVal z As Double, _
       ByVal hasM As Boolean, _
       ByVal m As Double, _
       ByVal hasId As Boolean, _
       ByVal id As Integer, _
       Optional ByVal spatialReference As SpatialReference _
    )

    Parameters

    x
    The X-value.
    y
    The Y-value.
    hasZ
    If true, the Z-value is set and HasZ is true.
    z
    The Z-value which is used only if hasZ is true.
    hasM
    If true, the M-value is set and HasM is true.
    m
    The M-value which is used only if hasM is true.
    hasId
    If true, the ID value is set and HasID is true.
    id
    The ID-value which is used only if hasId is true.
    spatialReference
    (Optional) The SpatialReference. The default value is null.
    Example
    Construct a MapPoint
    // Use a builder convenience method or use a builder constructor.
    
    // create a 3d point with M
    MapPoint pt = MapPointBuilderEx.CreateMapPoint(1.0, 2.0, 3.0, 4.0);
    
    
    // builderEx constructors don't need to run on the MCT.
    MapPointBuilderEx mb = new MapPointBuilderEx(1.0, 2.0, 3.0, 4.0);
    // do something with the builder
    
    MapPoint ptWithM = mb.ToGeometry();
    
    
    MapPoint clone = ptWithM.Clone() as MapPoint;
    MapPoint anotherM = MapPointBuilderEx.CreateMapPoint(ptWithM);
    
    
    MapPointBuilderEx builderEx = new MapPointBuilderEx(1.0, 2.0, 3.0);
    builderEx.HasM = true;
    builderEx.M = 4.0;
    
    pt = builderEx.ToGeometry() as MapPoint;
    
    
    // or another alternative with builderEx constructor
    builderEx = new MapPointBuilderEx(1.0, 2.0, true, 3.0, true, 4.0, false, 0);
    pt = builderEx.ToGeometry() as MapPoint;
    
    
    // or use a builderEx convenience method
    pt = MapPointBuilderEx.CreateMapPoint(1.0, 2.0, 3.0, 4.0);
    
    Requirements

    Target Platforms: Windows 11, Windows 10, Windows 8.1

    See Also