符号缩放

内容摘要
图层符号化后,让符号随着地图比例尺的缩放而缩放
过程描述
符号缩放需要先联系MapDocument与MapControl上的地图
Dim pMDoc as IMapDocument
Set pMDoc = New MapDocument
Set MapControl.Map = pMDoc.Map(0)

再通过IMapFrame接口设置MapUnits和ReferenceScale来实现符号的缩放
Dim pMF As IMapFrame
Dim bExist As Boolean

Dim pElement As IElement
Dim pGraphicsContainer As IGraphicsContainer
Set pGraphicsContainer = pMDoc.PageLayout
pGraphicsContainer.Reset
Set pElement = pGraphicsContainer.Next
Do While Not pElement Is Nothing
If TypeOf pElement Is IMapFrame Then
bExist = True
Exit Do
End If
Set pElement = pGraphicsContainer.Next
Loop

Set pMF = pElement
pMF.Map.MapUnits = esriMeters
pMF.Map.ReferenceScale = 20000

你可能感兴趣的:(缩放)