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)
相关推荐
中科GIS地理信息培训14 天前
【ArcGIS Pro 3.7新增功能4】增强空间统计中【评估点聚合的图格大小】工具:分析字段和时间间隔
人工智能·算法·arcgis
雪的季节15 天前
GIS 矢量数据格式
arcgis
非科班Java出身GISer15 天前
ArcGIS JS 基础教程(11):飞行定位 goTo
arcgis·arcgis js 飞行定位·arcgis js 定位·arcgis js 各种定位·arcgis js 飞行·arcgis js 定位到对象
我是Superman丶15 天前
前端技术手势识别
arcgis
da-peng-song18 天前
ArcGIS Desktop使用入门(四)——生成经纬度坐标
arcgis·经纬度坐标
da-peng-song18 天前
ArcGIS Desktop使用入门(三)图层右键工具——定义查询
数据库·arcgis·拆分数据·定义查询
星座52818 天前
破解水环境空间分析难题,迈向智慧水环境管理:ArcGIS水质评价、污染预测与洪水监测核心技术揭秘
arcgis·水环境·水文
非科班Java出身GISer19 天前
ArcGIS JS 基础教程(10):Camera 相机控制
arcgis·arcgis js 相机·arcgis js 相机控制·arcgis js 视角控制·arcgis js 飞行定位·arcgis js 定位·arcgis js 各种定位
码语智行19 天前
Shapefile获取空间数据和中心点坐标
java·arcgis
码语智行19 天前
地图上图、空间拓扑查询示例
java·arcgis