ArcGIS Pro 3.3 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / MapFactory Class / CreateMap Method / CreateMap(Uri) Method
The uri to the package or file

In This Topic
    CreateMap(Uri) Method
    In This Topic
    Creates a new Map in the project from a map package or file Uri. This method must be called on the MCT. Use QueuedTask.Run.
    Syntax
    public Map CreateMap( 
       Uri dataUri
    )
    Public Overloads Function CreateMap( _
       ByVal dataUri As Uri _
    ) As Map

    Parameters

    dataUri
    The uri to the package or file

    Return Value

    A map.
    Exceptions
    ExceptionDescription
    This method or property must be called within the lambda passed to QueuedTask.Run.
    The dataUri is null.
    Remarks
    To open a map, use ProApp.Panes.CreateMapPaneAsync method.
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3 or higher.
    See Also