Engine中如何只显示可视范围内数据的图例(动态图例)?

Engine中如何只显示可视范围内数据的图例(动态图例)?
已邀请:

刘峥 - ArcGIS多面手

赞同来自:

【解决办法】:
主要使用IDynamicLegendItem等接口,参考代码: 


Dim doc As IMxDocument = m_application.Document 
Dim map As IMap = doc.FocusMap 

Dim autoVisibility as Boolean= True 

Dim legend As Legend = Nothing 

For i As Integer = 0 To map.MapSurroundCount - 1 
If map.MapSurround(i).Name() = Legend Then 
legend = TryCast(map.MapSurround(i), Legend) 
End If 
Next 

If legend IsNot Nothing Then 
For i As Integer = 0 To legend.ItemCount - 1 
Dim item As IDynamicLegendItem = TryCast(legend.Item(i), IDynamicLegendItem) 
If item IsNot Nothing Then 
item.AutoVisibility = autoVisibility 
End If 
Next 
End If

要回复问题请先登录注册