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 eachmp in newMapItemsContainer
dimmyMap 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)
免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作!更多信息从访问主页:qidao123.com:ToB企服之家,中国第一个企服评测及商务社交产业平台。
页:
[1]