/// <summary>
/// 获取地图中所有的矢量图层
/// </summary>
/// <param name="pMap"></param>
/// <param name="puid"></param>
/// <returns></returns>
static public List<IFeatureLayer> GetFeatureLayers(IMap pMap)
{
//只读取IFeaturelayer
UID puid = new UIDClass();
puid.Value = "{40A9E885-5533-11d0-98BE-00805F7CED21}";
IFeatureLayer pFeatureLayer = null;
List<IFeatureLayer> featureLayers = new List<IFeatureLayer>();
IEnumLayer pEnumLayer = pMap.get_Layers(puid, true);
pEnumLayer.Reset();
pFeatureLayer = (IFeatureLayer)pEnumLayer.Next();
while (pFeatureLayer != null)
{
featureLayers.Add(pFeatureLayer);
pFeatureLayer = (IFeatureLaye
获取所有的点图层
最新推荐文章于 2024-11-14 08:46:29 发布
这段代码主要展示了如何从地图中获取所有的矢量图层以及点图层。首先通过`GetFeatureLayers`方法获取IMap中的所有IFeatureLayer,然后在`GetPointFeatureLayers`方法中过滤出几何类型为点的图层。这些方法对于地图数据处理和分析非常有用。
摘要由CSDN通过智能技术生成