怎样得到一个地图对象Bounds内某指定图层的所有图元 ?

解决方案 »

  1.   

    不太明白你的意思
    为什么要从bounds里呢?
    能不能直接得到要操作图元的图层的index
      

  2.   

    感谢两位
    itcoco:我不能直接用选中的方法从图上直接得到图元问题我已经解决了
    我是在程序里面得到图层上的图元,是在不选中的情况下
    用的是SearchWithinRectangle方法如:
    ’得到当前窗口中红线图层的所有图元
    Private Function GetFeaturesInHxtBounds() As MapXLib.Features
    Dim mlyrHXTC As MapXLib.Layer
    Dim mftrsHXTC As MapXLib.FeaturesSet mlyrHXTC = MapMain.GetLayerByName("红线图层")   ’自己写的函数,得到红线图层
    If Not mlyrHXTC Is Nothing Then
        Set mftrsHXTC = mlyrHXTC.SearchWithinRectangle(Map1.Bounds, miSearchTypeEntirelyWithin)
        If Not mftrsHXTC Is Nothing Then
           Set GetFeaturesInHxtBounds = mftrsHXTC.Clone
        End If
    End If
    End Function