ARCGIS PRO SDK MapProjectItem 地图项目类

一、获取工程中的所有地图

复制代码
Dim projectMaps As IEnumerable(Of MapProjectItem) = Project.Current.GetItems(Of MapProjectItem)()

二、从项目中删除地图

复制代码
Dim mapProjItem = Project.Current.GetItems(Of MapProjectItem)().FirstOrDefault(Function(mpi) mpi.Name = "需删除的地图名称")
Await QueuedTask.Run(Sub()
                           Project.Current.RemoveItem(mapProjItem)
                     End Sub)

三、遍历项目的所有 MapProjectItems

复制代码
dim newMapItemsContainer as IEnumerable(of MapProjectItem) = project.Current.GetItems(of MapProjectItem)()

Await QueuedTask.Run(Sub()
                          for each  mp in newMapItemsContainer
                               dim  myMap as Map = mp.GetMap()
                          next
                     End Sub)

四 获取特定的 MapProjectItem

复制代码
Dim mapProjItem = Project.Current.GetItems(Of MapProjectItem)().FirstOrDefault(Function(mpi) mpi.Name = "指定的地图名称")
'或等价于
Dim mapProjItem = Project.Current.GetItems(Of MapProjectItem)().FirstOrDefault(Function(mpi) mpi.Name.Equals("指定的地图名称"))

五、在工程中查找地图并将其打开

复制代码
Dim pmap as map
Dim mpi As MapProjectItem = Project.Current.GetItems(Of MapProjectItem)().FirstOrDefault(Function(m) m.Name.Equals("需删除的地图名称", StringComparison.CurrentCultureIgnoreCase))
If mpi Is Nothing = False Then
    pmap = mpi.GetMap()
End If
Await ProApp.Panes.CreateMapPaneAsync(pmap)
相关推荐
玩大数据的龙威1 天前
农经权二轮延包—各种地块示意图
python·arcgis
雯0609~1 天前
hiprint:实现项目部署与打印3-vue版本-独立出模板设计与模板打印页面
前端·vue.js·arcgis
玩大数据的龙威1 天前
农经权二轮延包—一键生成界址点界址线(ArcGIS插件)
arcgis
leaguecn3 天前
ArcGIS授权管理器断网后自动停止
网络·arcgis·授权
咔咔一顿操作3 天前
轻量无依赖!autoviwe 页面自适应组件实战:从安装到源码深度解析
javascript·arcgis·npm·css3·html5
杨超越luckly3 天前
从传统 GIS 向智能/自动化脚本演进:地铁接驳公交识别的 ArcGIS 与 Python 双路径实践
开发语言·arcgis·php·交互·数据可视化
枝上棉蛮5 天前
2026年GIS软件精选:五款工具的专业性与实用性解析
arcgis·gis·qgis·超图·gisbox·地图数据处理·gis工具
激动的兔子5 天前
Arcgis二次开发--评价单元综合限制级别判断矩阵工具
线性代数·arcgis·矩阵
yngsqq5 天前
arcgis 制作图例、视图页面设置
arcgis
规划酱6 天前
Arcgis中pip安装ezdxf部分GIS有pyparsing安装失败的情况处理
python·arcgis·pip·规划酱