Parameters
- item
- An ArcGIS.Desktop.Core.Item
Exception | Description |
---|---|
ArcGIS.Core.CalledOnWrongThreadException | This method or property must be called within the lambda passed to QueuedTask.Run. |
// cref: OpenItemDialog;ArcGIS.Desktop.Catalog.ItemDialog.Filter // cref: OpenItemDialog;ArcGIS.Desktop.Catalog.ItemDialog.InitialLocation // cref: OpenItemDialog;ArcGIS.Desktop.Catalog.ItemDialog.Title // cref: OpenItemDialog;ArcGIS.Desktop.Catalog.OpenItemDialog #region OpenItemDialog /// Adds a single item to a map OpenItemDialog addToMapDialog = new OpenItemDialog() { Title = "Add To Map", InitialLocation = @"C:\Data\NewYork\Counties\Erie\Streets", Filter = ItemFilters.Composite_AddToMap };
Map map = null; //Assume we get the selected webmap from the Project pane's Portal tab if (Project.Current.SelectedItems.Count > 0) { if (MapFactory.Instance.CanCreateMapFrom(Project.Current.SelectedItems[0])) { map = MapFactory.Instance.CreateMapFromItem(Project.Current.SelectedItems[0]); await ProApp.Panes.CreateMapPaneAsync(map); } }
Target Platforms: Windows 11, Windows 10