ArcGIS Pro 3.8 API Reference Guide
ArcGIS.Desktop.Layouts Namespace / MapFrame Class / MapToPage Method / MapToPage(Coordinate2D) Method
The point in map coordinates

In This Topic
    MapToPage(Coordinate2D) Method
    In This Topic
    Translates a point in map coordinates to a point in page coordinates. This method must be called on the MCT. Use QueuedTask.Run.
    Syntax
    public Coordinate2D MapToPage( 
       Coordinate2D mapCoord
    )
    Public Overloads Function MapToPage( _
       ByVal mapCoord As Coordinate2D _
    ) As Coordinate2D

    Parameters

    mapCoord
    The point in map coordinates

    Return Value

    A point in page coordinates
    Exceptions
    ExceptionDescription
    Mapframe must contain a 2D map
    This method or property must be called within the lambda passed to QueuedTask.Run.
    Remarks
    The map coordinates must be in the spatial reference of the map associated with the map frame. Page coordinates can only be translated for 2D maps. If the map frame does not contain a 2D map, an System.InvalidOperationException is thrown. If either map coordinate value is double.NaN then a point with X, Y both set to System.Double.NaN is returned.
    Requirements

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

    ArcGIS Pro version: 3.0 or higher.
    See Also