阅读:1944回复:9
[灌水]mo
<P>DBGRID</P>
<P><BR>Dim selection As New MapObjects2.Recordset<BR>Dim result As New MapObjects2.Polygon</P> <P><BR>Dim i As Variant</P> <P>Dim str As String<BR>Dim str1 As String<BR>Dim os As String<BR>Dim lastresult As MapObjects2.Polygon</P> <P>Dim pt As New MapObjects2.Point</P> <P>Dim poly As New MapObjects2.Polygon</P> <P>Dim sel As MapObjects2.Recordset</P> <P><BR>Private Sub Command1_Click()</P> <P> For Each i In Me.DBGrid1.SelBookmarks<BR> Data1.Recordset.Bookmark = i<BR> str1 = Me.Data1.Recordset.Fields(3).Name ; "=" ; Me.Data1.Recordset.Fields(3).Value<BR> str = str ; " " ; os ; " " ; str1<BR> os = "Or"<BR> Next<BR> <BR> Set selection = Map1.Layers("states").SearchExpression(str)<BR> ' Dim rs As New GeoEvent<BR> <BR> <BR>'While Not selection.EOF<BR>' Set result = selection.Fields("shape").Value<BR>' If Not lastresult Is Nothing Then<BR>' Set lastresult = result.Union(lastresult)<BR>' Else<BR>' Set lastresult = result<BR>' End If<BR>' selection.MoveNext<BR>'Wend</P> <P> Do While Not selection.EOF<BR> Set result = selection.Fields("shape").Value<BR> If lastresult Is Nothing Then<BR> Set lastresult = result<BR> Else<BR> Set lastresult = result.Union(lastresult)<BR> End If<BR> selection.MoveNext<BR> Loop<BR>'</P> <P> Map1.FlashShape lastresult, 2<BR> Set lastresult = Nothing<BR> str = ""<BR> os = ""<BR>End Sub</P> <P>Private Sub Form_Load()<BR> Me.Data1.DatabaseName = App.Path + "\..\" + "数据\MEXICO"<BR> Me.Data1.RecordSource = "States"<BR> str = ""<BR>End Sub</P> <P>Private Sub Map1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)<BR> Dim str2 As Single<BR> Data1.Recordset.MoveFirst<BR> Set pt = Map1.ToMapPoint(X, Y)<BR> Set sel = Map1.Layers("states").SearchByDistance(pt, 0.01, "")<BR> <BR> If sel.EOF Then<BR> MsgBox ("没有点击到要素,请重新选择")<BR> Else<BR> Set poly = sel.Fields("shape").Value<BR> Map1.FlashShape poly, 3<BR> </P> <P><BR> <BR>str2 = sel.Fields("state_id").Value<BR> <BR>Do While Not Data1.Recordset.EOF<BR> If str2 <> Data1.Recordset.Fields(3).Value Then<BR> Data1.Recordset.MoveNext<BR> Else<BR> Exit Do<BR> End If<BR> <BR>Loop</P> <P><BR> End If<BR>End Sub<BR></P> |
|
1楼#
发布于:2006-07-05 22:05
<P>chapter 5 AddEvent</P>
<P>Dim pt As MapObjects2.Point<BR>'Dim sym As MapObjects2.Symbol<BR>Dim shp As Object<BR>Dim rect As MapObjects2.Rectangle</P> <P>Private Sub Form_Load()<BR>Map1.TrackingLayer.SymbolCount = 4<BR> With Map1.TrackingLayer.Symbol(0)<BR> .SymbolType = moPointSymbol<BR> .Color = moRed<BR> .Size = 20<BR> .Style = moTrueTypeMarker<BR> .Font = "esri transportation ; municipal"<BR> End With<BR>End Sub</P> <P>Private Sub Map1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)<BR> If Option1 Then<BR> Set pt = Map1.ToMapPoint(X, Y)<BR> Map1.TrackingLayer.Symbol(0).CharacterIndex = 102<BR> Map1.TrackingLayer.AddEvent pt, 0<BR> ElseIf Option2 Then<BR> Set shp = trackshape1<BR> ElseIf Option3 Then<BR> Set shp = trackshape2<BR> ElseIf Option4 Then<BR> Set shp = trackshape3<BR>End If<BR> <BR>End Sub</P> <P>Private Function trackshape1() As Object<BR>Dim evPoly As New MapObjects2.GeoEvent<BR>Dim poly As New MapObjects2.Ellipse<BR> With Map1.TrackingLayer.Symbol(1)<BR> .SymbolType = moFillSymbol<BR> .Color = moYellow<BR> .Style = moGrayFill<BR> End With<BR> Set poly = Map1.TrackCircle<BR> Set trackshape1 = poly<BR> Set evPoly = Map1.TrackingLayer.AddEvent(poly, 1)<BR> </P> <P>End Function</P> <P><BR>Private Function trackshape2() As Object<BR>Dim evPoly As New MapObjects2.GeoEvent<BR>Dim poly As New MapObjects2.Polygon<BR> With Map1.TrackingLayer.Symbol(2)<BR> .SymbolType = moFillSymbol<BR> ' .Color = moGreen<BR> '.Style = moGrayFill<BR> End With<BR> Set poly = Map1.TrackPolygon<BR> Set trackshape2 = poly<BR> Set evPoly = Map1.TrackingLayer.AddEvent(poly, 2)<BR> </P> <P>End Function</P> <P><BR>Private Function trackshape3() As Object<BR>Dim evPoly As New MapObjects2.GeoEvent<BR>Dim poly As New MapObjects2.Rectangle<BR> With Map1.TrackingLayer.Symbol(3)<BR> .SymbolType = moFillSymbol<BR> .Color = moBlue<BR> .Style = moGrayFill<BR> End With<BR> Set poly = Map1.TrackRectangle<BR> Set trackshape3 = poly<BR> Set evPoly = Map1.TrackingLayer.AddEvent(poly, 3)<BR> </P> <P>End Function</P> <P><BR> </P> |
|
2楼#
发布于:2006-07-05 22:08
<P>chapter 6 </P>
<P>Dim rect As New MapObjects2.Rectangle<BR>Dim lyr As New MapObjects2.MapLayer<BR>Dim interShape As New MapObjects2.Polygon<BR>Dim resultpoly As New MapObjects2.Polygon<BR>Dim Rec As MapObjects2.Recordset<BR>Dim poly As New MapObjects2.Polygon<BR>Dim target As Object<BR>Dim str1 As String<BR>Dim str2 As String<BR>Dim lr As String<BR>Dim ud As String<BR>Dim hei As String<BR>Dim wid As String<BR>Dim r As MapObjects2.Rectangle<BR>Dim area As Single<BR>Const A = 10000</P> <P><BR>Private Sub Command1_Click()<BR> Set lyr = Map1.Layers("states")<BR> Set Rec = lyr.SearchExpression(str1)<BR> Set interShape = Rec.Fields("Shape").Value<BR> Map1.FlashShape interShape, 3<BR>End Sub</P> <P>Private Sub Command2_Click()<BR> Map1.TrackingLayer.RemoveEvent List1.ListIndex<BR> List1.RemoveItem List1.ListIndex<BR>End Sub</P> <P>Private Sub Command3_Click()<BR> Map1.TrackingLayer.ClearEvents<BR> List1.Clear<BR>End Sub</P> <P>Private Sub Command4_Click()<BR> Map1.TrackingLayer.ClearEvents<BR> Set poly = target.Buffer(str2)<BR> Map1.TrackingLayer.AddEvent poly, 4<BR> Set r = poly.Extent<BR>End Sub</P> <P>Private Sub Command5_Click()<BR> poly.Offset lr, ud<BR> Map1.TrackingLayer.ClearEvents<BR> Map1.TrackingLayer.AddEvent poly, 4<BR>End Sub</P> <P>Private Sub Command6_Click()<BR> r.Inset hei, wid<BR> Map1.TrackingLayer.AddEvent r, 4<BR>End Sub</P> <P>Private Sub Form_Load()<BR> Label1.Caption = "请输入你要找的图形的ID(1-32):"<BR> legend1.setMapSource Map1<BR> legend1.LoadLegend True<BR> Map1.TrackingLayer.SymbolCount = 5<BR> With Map1.TrackingLayer.Symbol(0)<BR> .SymbolType = moFillSymbol<BR> .Color = moRed<BR> .Style = 0<BR> End With<BR> With Map1.TrackingLayer.Symbol(1)<BR> .SymbolType = 2<BR> .Style = 0<BR> .Color = moBlue<BR> End With<BR> With Map1.TrackingLayer.Symbol(2)<BR> .SymbolType = 2<BR> .Style = 0<BR> .Color = moYellow<BR> End With<BR> With Map1.TrackingLayer.Symbol(3)<BR> .SymbolType = 2<BR> .Style = 0<BR> .Color = moPurple<BR> End With<BR> With Map1.TrackingLayer.Symbol(4)<BR> .SymbolType = 2<BR> .Style = 7<BR> .Color = moPurple<BR> End With<BR>End Sub</P> <P>Private Sub legend1_AfterSetLayerVisible(Index As Integer, isVisible As Boolean)<BR> Map1.Refresh<BR>End Sub</P> <P>Private Sub List1_Click()<BR> Dim foundEvt As MapObjects2.GeoEvent<BR> Set foundEvt = Map1.TrackingLayer.FindEvent(List1.List(List1.ListIndex))<BR> If Not foundEvt Is Nothing Then<BR> Map1.FlashShape foundEvt.Shape, 2<BR> ' foundEvt.SymbolIndex = 1<BR> Else<BR> MsgBox "Event not found"<BR> End If<BR>End Sub</P> <P>Private Sub Map1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)<BR> Dim Geopoly As MapObjects2.GeoEvent<BR> Set rect = Map1.TrackRectangle<BR> <BR> If Option1 Then<BR> Set resultpoly = rect.Intersect(interShape)<BR> area = Format(resultpoly.area * A, "0.00")<BR> Set Geopoly = Map1.TrackingLayer.AddEvent(resultpoly, 0)<BR> Geopoly.Tag = "交对象" ; " 面积是" ; area ; "平方公里"<BR> <BR> List1.AddItem Geopoly.Tag<BR> Map1.FlashShape resultpoly, 2<BR> <BR> ElseIf Option2 Then<BR> Set resultpoly = rect.Union(interShape)<BR> area = Format(resultpoly.area * A, "0.00")<BR> Set Geopoly = Map1.TrackingLayer.AddEvent(resultpoly, 1)<BR> Geopoly.Tag = "并对象" ; " 面积是" ; area ; "平方公里"<BR> List1.AddItem Geopoly.Tag<BR> Map1.FlashShape resultpoly, 2<BR> <BR> ElseIf Option3 Then<BR> Set resultpoly = rect.Difference(interShape)<BR> area = Format(resultpoly.area * A, "0.00")<BR> Set Geopoly = Map1.TrackingLayer.AddEvent(resultpoly, 2)<BR> Geopoly.Tag = "差对象" ; " 面积是" ; area ; "平方公里"<BR> List1.AddItem Geopoly.Tag<BR> Map1.FlashShape resultpoly, 2<BR> <BR> ElseIf Option4 Then<BR> Set resultpoly = rect.Xor(interShape)<BR> area = Format(resultpoly.area * A, "0.00")<BR> Set Geopoly = Map1.TrackingLayer.AddEvent(resultpoly, 3)<BR> Geopoly.Tag = "异或对象" ; " 面积是" ; area ; "平方公里"<BR> List1.AddItem Geopoly.Tag<BR> Map1.FlashShape resultpoly, 2<BR> End If<BR> <BR> Dim pt As MapObjects2.Point<BR> Set lyr = Map1.Layers(0)<BR> Option1 = False<BR> Option2 = False<BR> Option3 = False<BR> Option4 = False<BR> Set pt = Map1.ToMapPoint(X, Y)<BR> Set Rec = lyr.SearchByDistance(pt, 0.2, "")<BR> If Not Rec.EOF Then<BR> Set target = Rec.Fields("shape").Value<BR> Map1.FlashShape target, 3<BR> End If<BR> <BR> <BR>End Sub</P> <P>Private Sub Text1_Change()<BR> str1 = "STATE_ID=" ; Text1.Text<BR>End Sub</P> <P>Private Sub Text2_Change()<BR> str2 = Val(Text2.Text)<BR>End Sub</P> <P>Private Sub Text3_Change()<BR> lr = Val(Text3.Text)<BR>End Sub</P> <P>Private Sub Text4_Change()<BR> ud = Val(Text4.Text)<BR>End Sub</P> <P>Private Sub Text5_Change()<BR> hei = Val(Text5.Text)<BR>End Sub</P> <P>Private Sub Text6_Change()<BR> wid = Val(Text6.Text)<BR>End Sub<BR></P> |
|
3楼#
发布于:2006-07-05 22:08
<P>drawshape</P>
<P>Dim p As MapObjects2.Point<BR>Dim pts As MapObjects2.Points<BR>Dim pts2 As MapObjects2.Points<BR>Dim g_line As MapObjects2.Line<BR>Dim eli As MapObjects2.Ellipse<BR>Dim rect As MapObjects2.Rectangle<BR>Dim poly As MapObjects2.Polygon<BR>Dim sym As New Symbol<BR>Dim sym2 As New Symbol<BR>Dim sym3 As New Symbol<BR>Dim tsym As New TextSymbol<BR>Dim str As Integer</P> <P>Private Sub Map1_AfterTrackingLayerDraw(ByVal hDC As stdole.OLE_HANDLE)<BR> If Option1 Then<BR> If Not pts Is Nothing Then<BR> With sym<BR> .Style = moCircleMarker<BR> .Color = moRed<BR> .SymbolType = moPointSymbol<BR> .Size = 5<BR> End With<BR> Map1.DrawShape pts, sym<BR> If Check1 Then<BR> Map1.DrawText Text2.Text, pts, tsym<BR> End If<BR> End If<BR> <BR> ElseIf Option2 Then<BR> If Not g_line Is Nothing Then<BR> sym2.Color = moGreen<BR> <BR> Map1.DrawShape pts2, sym2<BR> <BR> If pts2.Count > 1 Then<BR> Map1.DrawShape g_line, sym2<BR> If Check1 Then<BR> Map1.DrawText Text2.Text, g_line, tsym<BR> End If<BR> End If<BR> <BR> End If<BR> <BR> ElseIf Option3 Then<BR> With sym3<BR> .SymbolType = moFillSymbol<BR> .Color = moYellow<BR> .Style = moDiagonalCrossFill<BR> End With<BR> If Not eli Is Nothing Then<BR> Map1.DrawShape eli, sym3<BR> End If<BR> <BR> ElseIf Option4 Then<BR> With sym3<BR> .SymbolType = moFillSymbol<BR> .Color = moPurple<BR> .Style = moDiagonalCrossFill<BR> End With<BR> If Not rect Is Nothing Then<BR> Map1.DrawShape rect, sym3<BR> If Check1 Then<BR> Map1.DrawText Text2.Text, rect, tsym<BR> End If<BR> End If<BR> <BR> ElseIf Option5 Then<BR> With sym3<BR> .SymbolType = moFillSymbol<BR> .Color = moOlive<BR> .Style = moDiagonalCrossFill<BR> End With<BR> If Not poly Is Nothing Then<BR> Map1.DrawShape poly, sym3<BR> End If<BR> <BR> ElseIf Option6 Then<BR> If Not pts Is Nothing Then<BR> With sym<BR> .Color = moRed<BR> .SymbolType = moPointSymbol<BR> .Size = 20<BR> .Font = fnt<BR> .Style = moTrueTypeMarker<BR> .CharacterIndex = str<BR> End With<BR> Map1.DrawShape pts, sym<BR> If Check1 Then<BR> Map1.DrawText Text2.Text, pts, tsym<BR> End If<BR> End If<BR> End If<BR>End Sub</P> <P>Private Sub Map1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)<BR> If Option1 Then<BR> Set pts = New MapObjects2.Points<BR> Set p = Map1.ToMapPoint(X, Y)<BR> pts.Add p<BR> ElseIf Option6 Then<BR> Set pts = New MapObjects2.Points<BR> Set p = Map1.ToMapPoint(X, Y)<BR> pts.Add p<BR> ElseIf Option2 Then<BR> Dim p1 As MapObjects2.Point<BR> If g_line Is Nothing Then<BR> Set g_line = New MapObjects2.Line<BR> End If<BR> If pts2 Is Nothing Then<BR> Set pts2 = New MapObjects2.Points<BR> End If<BR> <BR> Set p1 = Map1.ToMapPoint(X, Y)<BR> pts2.Add p1<BR> If pts2.Count = 1 Then<BR> g_line.Parts.Add pts2<BR> Set pts2 = g_line.Parts(0)<BR> End If<BR> Map1.TrackingLayer.Refresh True<BR> <BR> ElseIf Option3 Then<BR> Set eli = Map1.TrackCircle<BR> ElseIf Option4 Then<BR> Set rect = Map1.TrackRectangle<BR> ElseIf Option5 Then<BR> Set poly = Map1.TrackPolygon<BR> <BR> End If<BR> <BR> If Not Option2 Then<BR> Set pts2 = Nothing<BR> Set g_line = Nothing<BR> End If<BR> Map1.TrackingLayer.Refresh True<BR> <BR>End Sub</P> <P>Private Sub Text1_Change()<BR> str = Val(Text1.Text)<BR>End Sub</P> |
|
4楼#
发布于:2006-07-05 22:39
Private Sub refreshscale() '显示比例尺函数<BR> ScaleBar1.MapExtent.MaxX = Map1.Extent.Right<BR> ScaleBar1.MapExtent.MinX = Map1.Extent.Left<BR> ScaleBar1.MapExtent.MaxY = Map1.Extent.Bottom<BR> ScaleBar1.MapExtent.MinY = Map1.Extent.Top<BR> <BR> ScaleBar1.PageExtent.MinX = Map1.Left / Screen.TwipsPerPixelX<BR> ScaleBar1.PageExtent.MinY = Map1.Top / Screen.TwipsPerPixelY<BR> ScaleBar1.PageExtent.MaxX = (Map1.Left + Map1.Width) / Screen.TwipsPerPixelX<BR> ScaleBar1.PageExtent.MaxY = (Map1.Top + Map1.Height) / Screen.TwipsPerPixelY<BR> <BR> ScaleBar1.Refresh<BR> <BR> StatusBar1.Panels(1).Text = "比例 1 : " ; Format$(ScaleBar1.RFScale, "###,###,###,###,###")<BR>End Sub
|
|
5楼#
发布于:2006-07-05 22:42
Private Sub Map1_MouseMove(Button As Integer, Shift As Integer, x As Single, y As Single)<BR> '当在map1上移动鼠标,statusbar中的x,y值随之改变<BR> Dim pt As New MapObjects2.Point<BR> Set pt = Map1.ToMapPoint(x, y)<BR> StatusBar1.Panels(2).Text = "x=" ; pt.x<BR> StatusBar1.Panels(3).Text = "y=" ; pt.y<BR>End Sub
|
|
6楼#
发布于:2006-07-05 23:11
<P>eagleye</P>
<P>'使Map2和Map1联动;<BR>Private Sub Map1_AfterLayerDraw(ByVal Index As Integer, ByVal canceled As Boolean, ByVal hdc As stdole.OLE_HANDLE)<BR> If Index = 0 Then<BR> Map2.TrackingLayer.Refresh True<BR> End If<BR>End Sub</P> <P>'在Map2上画红色指示框;<BR>Private Sub Map2_AfterTrackingLayerDraw(ByVal hdc As stdole.OLE_HANDLE)<BR> Dim sym As New Symbol<BR> sym.OutlineColor = moRed<BR> sym.Size = 2<BR> sym.Style = moTransparentFill<BR> Map2.DrawShape Map1.Extent, sym<BR>End Sub</P> <P>'实现用Map2改变Map1的功能;<BR>Private Sub Map2_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)<BR> Dim curRectangle As MapObjects2.Rectangle<BR> Dim pt As New MapObjects2.Point<BR> '画方框改变Map1窗口<BR> Set curRectangle = Map2.TrackRectangle<BR> Set Map1.Extent = curRectangle<BR> '点击改变Map1位置<BR> Set pt = Map2.ToMapPoint(x, y)<BR> Map1.CenterAt pt.x, pt.y<BR>End Sub</P> |
|
7楼#
发布于:2006-07-05 23:12
<P>eagle 2</P>
<P>Option Explicit<BR>Dim g_feedback As DragFeedback</P> <P>Private Sub Map2_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)<BR> '将点击转换为Map2上的点对象;<BR> Dim p As Point<BR> Set p = Map2.ToMapPoint(x, y)<BR> <BR> '如果点击发生在方框内,开始拖动;<BR> If Map1.Extent.IsPointIn(p) Then<BR> Set g_feedback = New DragFeedback<BR> g_feedback.DragStart Map1.Extent, Map2, x, y<BR> End If<BR>End Sub</P> <P>'开始拖动方框<BR>Private Sub Map2_MouseMove(Button As Integer, Shift As Integer, x As Single, y As Single)<BR> If Not g_feedback Is Nothing Then<BR> g_feedback.DragMove x, y<BR> End If<BR>End Sub</P> <P>'拖动完成,并在Map1中显示新位置;<BR>Private Sub Map2_MouseUp(Button As Integer, Shift As Integer, x As Single, y As Single)<BR> If Not g_feedback Is Nothing Then<BR> Map1.Extent = g_feedback.DragFinish(x, y)<BR> Set g_feedback = Nothing<BR> End If<BR>End Sub</P> <P>'左键放大,右键缩小;<BR>Private Sub Map1_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)<BR> Dim r As MapObjects2.Rectangle<BR> If Button = vbLeftButton Then<BR> Set Map1.Extent = Map1.TrackRectangle<BR> ElseIf Button = vbRightButton Then<BR> Set r = Map1.Extent<BR> r.ScaleRectangle 2<BR> Map1.Extent = r<BR> End If<BR>End Sub</P> <P>'使Map2和Map1联动;<BR>Private Sub Map1_AfterLayerDraw(ByVal Index As Integer, ByVal canceled As Boolean, ByVal hdc As stdole.OLE_HANDLE)<BR> If Index = 0 Then<BR> Map2.TrackingLayer.Refresh True<BR> End If<BR>End Sub</P> <P>'在Map2上画红色指示框;<BR>Private Sub Map2_AfterTrackingLayerDraw(ByVal hdc As stdole.OLE_HANDLE)<BR> Dim sym As New Symbol<BR> sym.OutlineColor = moRed<BR> sym.Size = 2<BR> sym.Style = moTransparentFill<BR> Map2.DrawShape Map1.Extent, sym<BR>End Sub</P> |
|
8楼#
发布于:2006-07-05 23:17
<P>Jiang</P> <P>map1_mousedown事件</P> <P>dim p as point</P> <P>set p=map2.tomappoint(x,y)</P> <P>if map1.extent.ispointin(p) then</P> <P> set g_freeback=new dragfeedback</P> <P> g_freeback.dragstart map1.extent,map2,x,y</P> <P>end if</P> <P>map2_mousemove</P> <P>if not g_freeback is nothing then</P> <P> g_freeback.dragmove x,y</P> <P>end if</P> <P>map2_mouseup</P> <P>if not g_freeback is nothing then</P> <P> map1.extent= g_freeback.dragfinish(x,y)</P> <P> set g_freeback=nothing</P> <P>end if</P> <P>set resultshape=object.intersect(shape [,extent])</P> <P>set rec=map1.layer(0).searchexpression(expression)</P> <P>set rec=map1.layer(0).searchbydistance(shape,误差,SQL)</P> <P>set rec=layer.searchshape(shape,查找方法,SQL)</P> <P>shape=rec.fields("shape").value</P> <P> </P> <P>Private Sub Form_Load()<BR> Dim dc As New DataConnection<BR> Dim layer As MapLayer<BR> dc.Database = App.Path<BR> If Not dc.Connect Then<BR> MsgBox "在指定的文件夹下没找到图层数据文件!"<BR> End<BR> End If<BR> Set layer = New MapLayer<BR> Set layer.GeoDataset = dc.FindGeoDataset("States")<BR> Map1.Layers.Add layer<BR> Set layer = New MapLayer<BR> Set layer.GeoDataset = dc.FindGeoDataset("Rivers")<BR> Map1.Layers.Add layer<BR> Map1.Refresh<BR>End Sub</P> <P>set layer.renderer=new labelrenderer</P> <P>layer.renderer.field="NAME"</P> <P>layer.renderer.allowduplicates=true</P> <P>layer.renderer.symbol(0).height=0.5</P> <P>map1.layers.add layer</P> <P>form_load事件</P> <P>legend1.setmapsource map1</P> <P>legend1.loadlegend true</P> <P>legend1_aftersetlayervisible()事件</P> <P>map1.refresh</P> |
|
9楼#
发布于:2006-07-06 09:24
<DIV v:shape="_x0000_s3074"> <DIV class=O1 style="mso-line-spacing: '110 20 0'; mso-margin-left-alt: 468; mso-char-wrap: 1; mso-kinsoku-overflow: 1"><B>MO</B><B>除了支持</B><B>Shapefile</B><B>外,还有</B><B>Coverage</B><B>、</B><B>CAD</B><B>、</B><B>SDE</B><B>等格式。 </B></DIV> <DIV class=O1 style="mso-line-spacing: '110 20 0'; mso-margin-left-alt: 468; mso-char-wrap: 1; mso-kinsoku-overflow: 1"><B> 1 Coverage </B></DIV> <DIV class=O1 style="mso-line-spacing: '110 20 0'; mso-margin-left-alt: 468; mso-char-wrap: 1; mso-kinsoku-overflow: 1"><B> </B><B>和加载</B><B>Shapefile</B><B>类似,但要在</B><B>DataConnection</B><B>对象的</B><B>Database</B><B>属性前加上限定词</B><B>“</B><B>[arc]</B><B>”</B><B>; </B></DIV> <DIV class=O1 style="mso-line-spacing: '110 20 0'; mso-margin-left-alt: 468; mso-char-wrap: 1; mso-kinsoku-overflow: 1"><B> </B><B>点、线、面、标注类型的要素加载时,应在</B><B>FindGeoDataset</B><B>方法的</B><B>name</B><B>参数中分别加上</B><B>“</B><B>.Pat</B><B>”</B><B> </B><B>、</B><B>“</B><B>.Aat</B><B>”</B><B>、</B><B> </B><B>“</B><B>.Pat</B><B>”</B><B> </B><B>、</B><B>“</B><B>.Txt</B><B>”</B><B> </B><B>后缀。 </B></DIV> <DIV class=O style="mso-line-spacing: '100 50 0'; mso-margin-left-alt: 216"> </DIV> <DIV class=O style="mso-line-spacing: '100 50 0'; mso-margin-left-alt: 216"> <DIV v:shape="_x0000_s3074"> <DIV class=O1 style="mso-line-spacing: '110 20 0'; mso-margin-left-alt: 468; mso-char-wrap: 1; mso-kinsoku-overflow: 1"><B> 2 CAD </B></DIV> <DIV class=O1 style="mso-line-spacing: '110 20 0'; mso-margin-left-alt: 468; mso-char-wrap: 1; mso-kinsoku-overflow: 1"><B> </B><B>常用的</B><B>CAD</B><B>文件有</B><B>DXF</B><B>、</B><B>DWG</B><B>、</B><B>DGN</B><B>等。和</B><B>加载</B><B>Shapefile</B><B>类似,加载点、线、面、标注的要素</B><B>类型,在</B><B>DataConnection</B><B>对象的</B><B>Database</B><B>属性前加</B><B>上限定词</B><B>“</B><B>[CADPoint]</B><B>”</B><B>、</B><B> </B><B>“</B><B>[CADLine]</B><B>”</B><B>、</B><B> </B><B>“</B><B>[CADArea]</B><B>”</B><B>、</B><B> </B><B>“</B><B>[CADText]</B><B>”</B><B>; </B></DIV> <DIV class=O1 style="mso-line-spacing: '110 20 0'; mso-margin-left-alt: 468; mso-char-wrap: 1; mso-kinsoku-overflow: 1"><B> </B><B>在</B><B>FindGeoDataset</B><B>方法的</B><B>name</B><B>参数中指明文件</B><B>格式后缀,如</B><B>“</B><B>.Dxf</B><B>”</B><B>、</B><B> </B><B>“</B><B>.Dwg</B><B>”</B><B> </B><B>、</B><B>“</B><B>.Dgn</B><B>”</B><B> </B><B>。 </B></DIV> <DIV class=O style="mso-line-spacing: '100 50 0'; mso-margin-left-alt: 216"></DIV></DIV></DIV></DIV> |
|