ArcGIS Pro 3.0 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / IMapFactory Interface / 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
    Map CreateMap( 
       Uri dataUri
    )
    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, Windows 8.1

    See Also