要素的標註

2021-06-15 22:18:46 字數 2006 閱讀 1917

要素的標註標註有兩種方法,乙個是新增textelement到文件物件,另一種是基於要素的某個屬性進行標註,它需要載入資料支援。第一種方法在p8中可以看到。下面介紹後一種方法:

public sub anno(byval pgeofeatlyr as igeofeaturelayer,byval field as string)

dim pgeofeatlayer as igeofeaturelayer

pgeofeatlayer = pgeofeatlyr

dim pannoprops as iannotatelayerpropertiescollection              

pannoprops = pgeofeatlyr.annotationproperties

pannoprops.clear()               必須執行這個語句,否則裡面會預設有乙個pannolayerprops

dim pannolayerprops as iannotatelayerproperties

dim pposition as ilinelabelposition

dim pplacement as ilinelabelplacementpriorities

dim pbasic as ibasicoverposterlayerproperties

dim plabelengine as ilabelenginelayerproperties

dim ptextsyl as itextsymbol         標註的文字格式,注意

ptextsyl = new textsymbol

dim pfont as stdole.stdfont

pfont = new stdole.stdfont

pfont.name = "verdana"

pfont.size = 5

ptextsyl.font = pfont

ptextsyl.color = hsvcolor(250, 160, 200)

pposition = new linelabelposition

pposition.parallel = false

pposition.perpendicular = true

pplacement = new linelabelplacementpriorities

pbasic = new basicoverposterlayerproperties

pbasic.featuretype = esribasicoverposterfeaturetype.esrioverposterpolyline

pbasic.linelabelplacementpriorities = pplacement

pbasic.linelabelposition = pposition

plabelengine = new labelenginelayerproperties

plabelengine.symbol = ptextsyl

plabelengine.basicoverposterlayerproperties = pbasic

plabelengine.expression = field          field必須是這個樣子——"[state_name]"

pannolayerprops = plabelengine

pannoprops.add(pannolayerprops)

pgeofeatlyr.displayannotation = true

axmapcontrol.ctlrefresh(esriviewdrawphase.esriviewbackground)

end sub

消除標註的方法也很簡單,由於pgeofeatlyr是乙個全域性變數,我們只要設定如下**即可:

pgeofeatlyr.displayannotation = false

axmapcontrol.ctlrefresh(esriviewdrawphase.esriviewbackground)

標註資料解析 xml格式的標註資料解析

xml基本構成 1.標籤 標籤名 ps 起始標籤和結束標籤是成對存在的。且結束標籤多了個 起始標籤 成份訪問 結合 說明 1.構建樹和跟節點 2.獲取子節點 ps 直客獲取名稱相同的直接子節點 find 節點名稱 獲取同名直接子節點 缺點 只能根據提供的名稱獲取第乙個子節點 findall 節點名稱...

模式的要素

名字 name 有意義的 簡短而準確的名字 問題 problem 能夠描述該模式的用意,要達到的目標和效果 環境或初始條件 context or initial context 模式的問題和模式的解答出現所需要的前提條件 力 forces 所有對模式有影響的力,比如 約束 為所得到的好處付出的代價 ...

生活的要素

人在生活中最求的要素應該包含的一些東西 健康 感情 修養 財富。健康。我把它排在第一位,原因恐怕再明顯不過了吧?沒有了健康,其他一些都是空談。所以每天應該抽出一定的時間,作為對健康的長期投資。感情。家庭 愛人 朋友都是生活中不可缺少的組成部分,親情 友情 愛情都是不可替代的精神支柱。一句話,人不能作...