电脑桌面
添加小米粒文库到电脑桌面
安装后可以在桌面快捷访问

mapx下完成的多项实例程序VIP专享VIP免费

mapx下完成的多项实例程序_第1页
mapx下完成的多项实例程序_第2页
mapx下完成的多项实例程序_第3页
如何在MapX 下读取属性值 有三种方法: 1. 由Layer 对象的KeyField 属性来设立要读取属性值的字段名。 接着,由Feature 对象的keyValue 读取此行的属性值。 2. 将图层加入到Datasets, 由Dataset 对象的Value(x,y)属性,通过设置行号,列号来获得属性值。 3. 将图层加入到Datasets,之后由RowValues(ftr)获取整行的值。 Dim ds As MapXLib.Dataset, lyr As MapXLib.layer Dim ftrs As Features Dim ftr As Feature Dim rv As RowValue Dim rvs As RowValues Dim DsName As String ‘数据集名 Dim DsRows As Long, DsCols As Long Dim i As Long, j As Long Set ds = Formmain.Map1.Datasets.Item(DsName) Set lyr = ds.layer Set ftrs = lyr.AllFeatures DsCols = ds.Fields.Count DsCols = DsCols + 1 DsRows = ftrs.Count Grid1.Rows = DsRows + 1 Grid1.Cols = DsCols Grid1.Row = 0 For i = 0 To DsCols - 1 Grid1.Col = i Grid1.Text = ds.Fields.Item(i + 1).Name Next i Grid1.Col = DsCols - 1 Grid1.Text = "Fkey" lyr.BeginAccess miAccessRead i = 1 For Each ftr In ftrs Set rvs = ds.RowValues(ftr) j = 0 For Each rv In rvs If Not IsNull(rv.Value) Then Grid1.TextArray(i * DsCols + j) = Trim(rv.Value) j = j + 1 Next Grid1.TextArray(i * DsCols + j) = ftr.FeatureKey i = i + 1 Next lyr.EndAccess miAccessEnd Set ftr = Nothing Set ftrs = Nothing Set ds = Nothing Set rv = Nothing Set rvs = Nothing Set lyr = Nothing 注意:BeginAccess,以及EndAccess 可以明显的提高属性读取的速度。回页首 自定义范围专题图 mapx 的专题图用户可以进行完全的定制,下面是自定义范围专题图的例子。 Dim ds As New MapXLib.Dataset Dim thm As New MapXLib.Theme Set ds = Formmain.Map1.Datasets(ToolBars.Combo2.Text) Set thm = ds.Themes.add(0, "aa", "aa", False) thm.Legend.Compact = False thm.AutoRecompute = False 'thm.ComputeTheme = False thm.DataMax = 700 thm.DataMin = 100 thm.ThemeProperties.AllowEmptyRanges = True thm.ThemeProperties.Num...

1、当您付费下载文档后,您只拥有了使用权限,并不意味着购买了版权,文档只能用于自身使用,不得用于其他商业用途(如 [转卖]进行直接盈利或[编辑后售卖]进行间接盈利)。
2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。
3、如文档内容存在违规,或者侵犯商业秘密、侵犯著作权等,请点击“违规举报”。

碎片内容

确认删除?
VIP
微信客服
  • 扫码咨询
会员Q群
  • 会员专属群点击这里加入QQ群
客服邮箱
回到顶部