【文章內(nèi)容簡介】
n n o t a t i o n s . A d d S y m b o l X , Y A d d T e x t 增加文本標(biāo)注。第四個參數(shù)為第一個字的起始位置。M a p 1 . A n n o t a t i o n s . A d d T e x t“ D e v e lo p e r S e r v ic e s ” , 7 9 .4 4 ,4 6 . 8 8 8 9 , m i P o s i t i o n T LR e m o v e 刪除指定標(biāo)注。 M a p 1 . A n n o t a t i o n s . R e m o v e 1R e m o v e A l l 刪除所有的標(biāo)注。 M a p 1 . A n n o t a t i o n s . R e m o v e A l lPage 34 feature ? 一個 feature 對象相應(yīng)于圖層中的圖元 , 例如紐約 、 芝加哥 、 路易斯安那或高速公路 I10。 它們在地圖上被表示為符號 、 線或者區(qū)域 。 ? Feature 對象的方法允許用戶創(chuàng)建和操作獨立的feature對象 。 如果用戶創(chuàng)建了一個獨立的 feature對象, 在使用 feature 對象的方法與屬性之前 , 必須將這個獨立的對象關(guān)聯(lián)到 Map對象上 。 將獨立圖元與 Map相關(guān)聯(lián)可以使此對象與某一坐標(biāo)系相聯(lián) 。 Page 35 feature ? 。 屬性 描述C e n t e r X 定義 F e a t u r e 中點的 X 坐標(biāo)C e n t e r Y 定義 F e a t u r e 中點的 Y 坐標(biāo)F e a t u r e I D 定義 f e a t u r e 的 I D ,每個 f e a t u r e 在同一層中只有唯一的 I D . 這是一個整數(shù)值 .L e n g t h 定義 f e a t u r e 的長度P e r i m e t e r F e a t u r e 的周長N a m e 定義 f e a t u r e 的名字T y p e 定義 f e a t u r e 的類型 ( p o i n t , l i n e , e t c . )Page 36 FeatureFactory ? 此對象使用戶能夠創(chuàng)建新的地圖元素 , 或者通過在已有元素上執(zhí)行操作來創(chuàng)建元素 ( 例如緩沖區(qū) ) 。 ? 創(chuàng)建一個地圖元素有兩個重要的步驟 。 首先是創(chuàng)建點集 , 對象將由此來創(chuàng)建 。 使用一個點集類似于 “連點游戲 ” 。 如果只有一個點 , 只能創(chuàng)建一個符號對象 。 如果有兩個點 , 可以創(chuàng)建一條直線 。 如果有三個或更多的點 , 就或者可以創(chuàng)建一條折線 ( 由多個段組成的線 , 但仍被當(dāng)作一個元素 ) , 或者可以創(chuàng)建一個區(qū)域 ( 有封閉的邊界 ) 。 樣式在設(shè)置新對象的 Type屬性時決定 。 Page 37 FeatureFactory ? Dim f As ? Dim p As New ? ? 39。 使用地圖當(dāng)前的中心作為點坐標(biāo) ? , ? ? 39。 創(chuàng)建文本圖元并將其添加到圖層 1 ? Set f = (1).AddFeature((p, Some Text)) Page 38 地圖查詢 ? 返回到選擇集 Selection,高亮顯示 SelectAll SelectById SelectByPoint SelectByRadius SelectByrectangle SelectByRegion ? 返回圖元集合 Features SearchWithDistance SearchWithinFeature SearchWithinRegtangle Page 39 Selections ? Feature 對象的集合,由選擇動作產(chǎn)生 ? 自動高亮 ? 每層都有 selection Page 40 屬性查詢 ? Layer對象的 Search方法, where子句 例如 ftrs=(“Character_Name like ”“%市 ”“” ) ftrs=(“Area(obj)10000000”) ? Find查找對象 SearchEx方法 ? 返回 FindResult對象 Page 41 Find ? 用于在地圖上定位 feature,前提是被操作的圖層必須先有被索引的字段 ? FindFeature:返回 find對象的 search方法的結(jié)果。 ? findRC: result codes返回 find的結(jié)果。 Page 42 屬性數(shù)據(jù)讀寫 ? 設(shè)置 Layer對象的 keyfield屬性確定字段 設(shè)置 feature對象的 keyvalue屬性讀取 /設(shè)置值,更改后調(diào)用 update方法 . ? 用 dataset對象的 value(i,j)屬性讀取值 pop=(10,9) ? Rowvalues集合 ,Rowvalue對象,按行讀取,要求將圖層加入數(shù)據(jù)集 [RowValues=](Row) Page 43 數(shù)據(jù)綁定 ? DataSets 可以把數(shù)據(jù)與地圖進(jìn)行綁定。 ? 例如,一個 MSAccess 數(shù)據(jù)庫存放各縣的銷售數(shù)據(jù),一個Lotus Notes 數(shù)據(jù)庫存放所有銷售人員的數(shù)據(jù),你可以將兩個數(shù)據(jù)庫中的數(shù)據(jù)與地圖進(jìn)行綁定,在地圖上發(fā)現(xiàn)數(shù)據(jù)中隱含的銷售數(shù)量或突出顯示兩個數(shù)據(jù)庫中數(shù)據(jù)的相互關(guān)系。 ? 數(shù)據(jù)綁定是將數(shù)據(jù)源中的數(shù)據(jù)加入 MapX的過程,它將外部數(shù)據(jù)與地圖聯(lián)系起來。在 MapX中,這些數(shù)據(jù)是通過 DataSet 對象來表示的。 Dataset對象則由數(shù)據(jù)綁定而產(chǎn)生。 Page 44 數(shù)據(jù)綁定 DataBinding DAO Other Sources ODBC NOTES Page 45 如何綁定數(shù)據(jù) ? ( Type, SourceData, [Name], [Geofield], [SecondaryGeofield], [BindLayer], [Fields], [Dynamic] ) ? 在 map中以 feature來顯示 ? 在圖層中增加字段 對于 BindLayer miBindLayerTypeNormal =0 miBindLayerTypeXY = 1 miBindLayerTypePointRef=2 Page 46 ? Type ? Dataset的類型 ? SourceData ? 對數(shù)據(jù)源的引用 ? Name ? D