阅读:26665回复:51
[VB+MAPX]功能开发的实现代码共享(只允许贴码跟贴)
我先来一段。。。
Private Sub Map1_MapViewChanged() 主要实现比例尺和视野 Dim ZoomValue As Double Dim CoordUnit As Integer Dim areunit As Integer Dim UnitStr As String Dim areunit1 As Integer Dim coordunit1 As Integer Dim i As Integer Dim bilichi As Double ZoomValue = GISmain.Map1.zoom CoordUnit = GISmain.Map1.MapUnit areunit = GISmain.Map1.AreaUnit Map1.MapUnit = 6 bilichi = (Map1.zoom * 567) / Map1.Width Map1.MapUnit = CoordUnit Select Case CoordUnit 以下为单位,粘的时候乱码了。。。 Case 0 UnitStr = "英里" coordunit1 = 0 Case 1 UnitStr = "¹«Àï" coordunit1 = 1 Case 2 UnitStr = "Ó¢´ç" coordunit1 = 2 Case 3 UnitStr = "Ó¢³ß" coordunit1 = 3 Case 4 UnitStr = "Âë" coordunit1 = 4 Case 5 UnitStr = "ºÁÃ×" coordunit1 = 5 Case 6 UnitStr = "ÀåÃ×" coordunit1 = 6 Case 7 UnitStr = "Ã×" coordunit1 = 7 Case 9 UnitStr = "º£Àï" coordunit1 = 8 Case 13 UnitStr = "¶È" coordunit1 = 9 End Select Select Case areunit Case 14 areunit1 = 0 Case 15 areunit1 = 1 Case 16 areunit1 = 2 Case 17 areunit1 = 3 Case 18 areunit1 = 4 Case 19 areunit1 = 5 Case 20 areunit1 = 6 Case 21 areunit1 = 7 Case 29 areunit1 = 8 End Select Combo1.Clear Combo2.Clear Combo3.ListIndex = coordunit1 Combo4.ListIndex = areunit1 For i = 1 To GISmain.Map1.Layers.Count Combo1.AddItem GISmain.Map1.Layers.Item(i).Name Next i For i = 1 To GISmain.Map1.DataSets.Count Combo2.AddItem GISmain.Map1.DataSets.Item(i).Name Next i If Combo1.ListCount > 0 Then Combo1.ListIndex = 0 If Combo2.ListCount > 0 Then Combo2.ListIndex = 0 StatusBar1.Panels.Item(2).Text = "视野" + Format(str(ZoomValue), "#,##0.000000") + " " + UnitStr StatusBar1.Panels.Item(3).Text = 比例尺" + "1:" + Format(str(bilichi), "#,##0.00") Map2.Refresh End Sub [此贴子已经被作者于2003-12-7 8:07:43编辑过]
|
|
1楼#
发布于:2009-05-13 10:25
<P>我打不开第一页 不知道有没有轨迹回放的程序 急需 谢谢了</P>
|
|
2楼#
发布于:2007-11-26 18:58
<P>不错,很好啊,我也来学学!!</P>
|
|
3楼#
发布于:2007-03-09 18:21
<P>哈哈!谢谢!111111111111111111111111111111111111</P>
|
|
4楼#
发布于:2006-08-30 14:54
hao
|
|
5楼#
发布于:2006-06-09 15:59
<P>如果我是创建的临时表,但在第二次打开后,系统会提示</P>
<P>A file named .TAB already exists.</P> <P>这是什么原因呢,又该怎样解决呢</P> |
|
6楼#
发布于:2006-06-09 13:32
<P>我想请问一下第二种添加图元的方法里面</P>
<P>li.AddParameter "FileSpec", App.Path ; "\custtab.tab"</P> <P>这段代码取消后是否就成了临时图层</P> <P>可后面的代码 Map1.Layers.Add li, 1这里就要报错,这是什么原因呢</P> |
|
7楼#
发布于:2006-06-09 13:28
我想请问一下第二种添加图元的方法里面
|
|
8楼#
发布于:2005-05-24 21:48
<P> 我怎么看不到啊!<img src="http://www.gisempire.com/bbs/Skins/default/topicface/face91.gif"></P>
|
|
9楼#
发布于:2005-05-22 22:32
<P>我还不知道怎么实现测距啊,请你帮帮我啊</P><P> 让 我看看测距的代码,谢谢 </P>
|
|
上一页
下一页