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)
相关推荐
2501_934304402 天前
新增2026年! 2012-2026年全国逐月夜间灯光数据
arcgis·gis数据
梅如你3 天前
中国2026年路网数据
arcgis·gis·遥感
梦想的初衷~3 天前
GPT × ArcGIS 强强联合:AI助力数据处理、空间分析、可视化及多案例综合应用实战教程
人工智能·gpt·arcgis
时间的情敌4 天前
《WebGIS EPSG:4326 与 EPSG:3857 墨卡托投影转换》
arcgis·mars2d
时间的情敌4 天前
《Mars2D 快速上手,从零搭建三维 GIS 项目》
arcgis·mars2d
那年那棵树6 天前
基于WebGis的人生如旅地图系统
前端·arcgis·vue·课程设计
梅如你7 天前
全国逐年 1KM 分辨率 NDVI 植被指数数据集(2000-2024)
arcgis·gis·遥感
const_qiu8 天前
第二章 2.4:搭建 Monorepo 骨架 + 共享包 @autix/contracts
java·人工智能·arcgis
地图小课堂9 天前
Bigemap Pro 教程|如何打开Arcgis文件格式(shp、gdb、gdbtable、mdb)
arcgis
广州浮点FLOATLIC9 天前
ArcGIS Pro 批处理失败,怎样判断是脚本报错还是许可条件不满足?
arcgis·许可管理·许可证管理·许可监控