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

CreateMap(Uri) Method
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
)

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