ARCGIS PRO SDK VB2022 图层要素类类型判断

arcgis pro 常见要素类类型有以下几种:

FeatureLayer ------要素图层(矢量数据)

RasterLayer ------栅格图层

MapImageLayer ------地图图像图层

VectorTileLayer ------矢量切片图层

SceneLayer ------场景图层(3D)

GroupLayer ------组图层

WMSLayer - WMS ------服务图层

WMTSLayer - WMTS------服务图层

复制代码
Public Sub ProcessLayer(layer As Layer)
    If layer Is Nothing Then Return

    If TypeOf layer Is FeatureLayer Then
        Dim featureLayer As FeatureLayer = CType(layer, FeatureLayer)
        MessageBox.Show($"要素图层: {featureLayer.Name}")
        
    ElseIf TypeOf layer Is RasterLayer Then
        Dim rasterLayer As RasterLayer = CType(layer, RasterLayer)
        MessageBox.Show($"栅格图层: {rasterLayer.Name}")
        
    ElseIf TypeOf layer Is GroupLayer Then
        Dim groupLayer As GroupLayer = CType(layer, GroupLayer)
        MessageBox.Show($"组图层包含 {groupLayer.Layers.Count} 个子图层")
        
    ElseIf TypeOf layer Is MapImageLayer Then
        Dim mapImageLayer As MapImageLayer = CType(layer, MapImageLayer)
        MessageBox.Show($"地图图像图层: {mapImageLayer.Name}")
        
    Else
        MessageBox.Show($"未知图层类型: {layer.GetType().Name}")
    End If
End Sub
相关推荐
GIS思维12 小时前
ArcGIS汉化不成功的解决方案
arcgis·arcgis汉化
xyt117222817714 小时前
宗地四至提取工具
python·arcgis
智航GIS16 小时前
ArcGIS大师之路500技---055矢量数据去带号
arcgis
GIS思维18 小时前
ArcGIS Pro3.5.2安装包+安装详细教程+系统需求
arcgis·arcgispro
GIS思维20 小时前
ArcGIS土地利用现状图制作全流程
arcgis·地表覆盖·天地图·土地利用现状图
GIS思维21 小时前
ArcGIS Pro查看多期数据变化!卷帘+多地图联动齐上架
arcgis·arcgispro·天地图
YuanYWRS1 天前
ArcGIS基础:如何删除同类多个图斑中面积较小,只保留其中面积最大的一个图斑的操作
arcgis·多个图斑取面积最大的一个
智航GIS1 天前
ArcGIS大师之路500技---054字段顺序调整
arcgis
YuanYWRS2 天前
ArcGIS基础:如何在字段计算器里,从1-100进行顺序编号
arcgis
trojan__2 天前
arcgis界面右侧目录如何打开
arcgis·gis·arcmap