zoukankan      html  css  js  c++  java
  • 不用mapcontrol获得一个mxd的图层

     //不用mapcontrol获得一个mxd的图层
            private static int getLayercount(string mxdFileName)
            {
                IMapDocument pMapDocument = new MapDocumentClass();
                pMapDocument.Open(mxdFileName, "");
                INetworkDataset networkDataset = null;
                int num = 0;
                //iterate all the maps
                for (int cMap = 0; cMap < pMapDocument.MapCount; cMap++)
                {
                    for (int cLayer = 0; cLayer < pMapDocument.get_Map(cMap).LayerCount; cLayer++)
                    {
                          ILayer pLayer = pMapDocument.get_Map(cMap).get_Layer(cLayer);
                          MessageBox.Show(pLayer.Name);
                        num++;
                    }
                }
                return num;
            }
  • 相关阅读:
    bzoj 1497 最小割模型
    bzoj 1024 暴力深搜
    POJ1163(简单的DP)
    POJ3287(BFS水题)
    N皇后问题(DFS)
    BFS求解迷宫的最短路径问题
    poj2386(简单的dfs/bfs)
    Fence Repair(poj3253)
    Best cow Line(POJ 3617)
    全排列
  • 原文地址:https://www.cnblogs.com/gisoracle/p/1631839.html
Copyright © 2011-2022 走看看