MapX绘图操作功能的开发
This presentation is the property of its rightful owner.
Sponsored Links
1 / 7

MapX绘图操作功能的开发 PowerPoint PPT Presentation


  • 134 Views
  • Uploaded on
  • Presentation posted in: General

MapX绘图操作功能的开发. 荆平 天津师范大学城环学院. Form_Load事件必须添加的代码. Dim newLayer As Layer Set newLayer = Map1.Layers.CreateLayer("Temporary Layer", , 1) newLayer.Editable = True Set Map1.Layers.InsertionLayer = newLayer UpdateToolbarButtons. Case 5

Download Presentation

MapX绘图操作功能的开发

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript


Mapx

MapX绘图操作功能的开发

荆平

天津师范大学城环学院


Form load

Form_Load事件必须添加的代码

Dim newLayer As Layer

Set newLayer = Map1.Layers.CreateLayer("Temporary Layer", , 1)

newLayer.Editable = True

Set Map1.Layers.InsertionLayer = newLayer

UpdateToolbarButtons


Mapx

Case 5

Map1.CurrentTool = miAddPolylineTool

Case 6

Map1.CurrentTool = miAddRegionTool

Case 7

Map1.CurrentTool = miTextTool

Case 8

Map1.Rotation = Map1.Rotation + 10

End Select

MapX绘图操作

Select Case Button.Index

Case 1

Map1.CurrentTool = miArrowTool

Case 2

Map1.CurrentTool = miSelectTool

Case 3

Map1.CurrentTool = miAddPointTool

Case 4

Map1.CurrentTool = miAddLineTool


Mapx

删除文本标注

Map1.Annotations.Remove 1


Mapx

图层的添加和删除

(1)图层的查看:Map1.Layers.LayersDlg

(可添加、删除、调整顺序)

(2)添加

Dim lyr As Layer

Set lyr = Map1.Layers.CreateLayer(Text3.text, , 1)

lyr.Editable = True

Set Map1.Layers.InsertionLayer = lyr


Mapx

图片的剪贴

Dim xx, yy As Single

xx = Val(Text9.text)

yy = Val(Text10.text)

Map1.PaperUnit = miUnitCentimeter

If xx = 0 Or yy = 0 Then

Map1.ExportMap "clipboard", miFormatBMP, 8.5, 5.6

Else

Map1.ExportMap "clipboard", FormatBMP, xx, yy

End If


Mapx

图片的粘贴

Picture1.Picture = Clipboard.GetData()

Clipboard.Clear


  • Login