‘复制
For I=1 to Ftrs.Count
CopyFtrs.add Ftrs.Item(I)
Next
‘粘贴(图形)
Set lyr_1=mainmap.Layers.item(LayerName_1)
Mainmap.AutoRedraw=False
Lyr_1.EditabLED=True
For J=1 to CopyFtrs.Count
Lyr_1.AddFeature CopyFtrs.Item(J)
Next
Lyr_1.Refresh
Mainmap.AutoRedraw=True
Lyr_1.EditabLED=False
3、地图的打印
Dim iScaleMode As Integer
iScaleMode = MainMap.Container.ScaleMode
MainMap.Container.ScaleMode = 6
On Error GoTo PrinterError
Printer.Print " "
Printer.CurrentX = 0
Printer.CurrentY = 0
MainMap.PrintMap Printer.hDC, 0, 0, MainMap.Width * 100, MainMap.Height * 100
Printer.NewPage
Printer.EndDoc
MainMap.Container.ScaleMode = iScaleMode
Exit Sub
PrinterError:
If Err.Number = 482 Then
On Error Resume Next
CommonDialog1.Flags = &H40
CommonDialog1.ShowPrinter
Else
MsgBox " 打印机存在错误,请更正后重试。错误号:" + (Str(Err.Number)), , "失败"
End If
4、另存为图片文件
MainMap.ExportMap(App.Path+”Images”, miFormatJPEG) ‘输出当前地图窗口
参数设置:MainMap.ExportSelection=True ‘将选中部分以不同于其他未选中地图部分形式输出
六、专题图
发表时间: 2002-07-30 14:22
6种专题图:除独立值专题图绑定的字段类型可以是字符的以外,都必须是数字类型。与其他数据源绑定时,使用ODBC
调用ThemeDlg对话框可以让用户自己定义专题图。示例:
For Each ftr In lyr.Selection
′ The children of the layer are the individual
′ features
Set ftrNode = QueryTree.Nodes.Add(lyrNode, tvwChild,lyr.Name _
& ftr.Name & Str$(ftr.FeatureID), ftr.Name)
For Each fld In ds.Fields
′ Each feature has data attached to it; add
′ this data as a child of the feature
lyr.KeyField = fld.Name
QueryTree.Nodes.Add ftrNode, tvwChild, , lyr.KeyField _
& ": " & ftr.KeyValue
Next






