Mapx + VB Summary Summary (3)

xiaoxiao2021-03-06  105

PPP80 went to Tianjin last month to do this project, overtime is busy with the 11th, and now the project finally completed the first stage, and it can be left out. Before doing this project, I just learned a month of supermap, but I feel that these things are big and small, there is no terrible; the key is that it is the original .NET, but now I have to use VB. . . Forget it, catch the foil, will not have to have it!

In fact, I really can only say the same knowledge of half solutions, learning and use, but I will leave something to others and others, maybe help:) (a total of five)

6 Production Topics Map1.DataSets.item (DSName) .Themes.add Themetype, FieldList, "TrafficflicFlupiebar" Note: If the histogram and pie chart can be multiple fields, FieldList is an array name; otherwise, the field name.

If you feel that the special map made is not big enough, you can control the size of the special map Map1.DataSets.Item (DSNAME) .Themes ("Trafficflubar"). Properties.size = 1 'Graphic height, the default value is 0.25 inches Map1. DataSets.item (DSNAME) .Themes ("Trafficflubar"). Properties.Barwidth = 1 'The width of each cylinder, the default value is 0.25 inches You can change the legend of the topic, such as the special map of the production level symbol, default is the #, you can change into your favorite style Dim oStyle as style Set oStyle = New style oStyle.SymbolFont.Size = 35 oStyle.SymbolCharacter = 35 oStyle.SymbolFont.Name = "Map Symbols" oStyle.SymbolFontColor = & HFF00FFMap1.DataSets .Item (dsName) .Themes ( "trafficfluGradSymbol"). Properties.SymbolStyle = oStyleSet oStyle = Nothing 7 custom thematic FIG legend Dim LegTexts As New MapXLib.LegendTexts Dim tLegend As MapXLib.LegendSet tLegend = Map1.DataSets (dsName) .Themes . ( "trafficflubar") Legend tLegend.Title = "traffic" tLegend.Left = Map1.MapScreenWidth - tLegend.Width tLegend.Top = Map1.MapScreenHeight - tLegend.Height tLegend.BodyTextStyle.TextFont.Size = 8 Set LegTexts = tLegend .Legendtexts tlegend.visible = true legtexts (1) .text = "Small goods" legtexts (2) .text = "中 货" legtexts (3) .text = "big goods" 8 Bang Declaration Tag field, custom label style SQLSTR is the data set taken by the database, showfield is to display Field Name Sub showDataLable (Sqlstr as string, showfield as string) '-------------------------- Show Tag Dim CNShowData As New Adod.com.connectionDIM CMD As New ADODB.CommandDim rs As New ADODB.RecordsetOn Error Resume NextCnShowData.CursorLocation = adUseClientCnShowData.Open ConStrSet cmd.ActiveConnection = CnShowDataCmd.CommandText = sqlstr

rs.Open Cmd,, adOpenKeyset, adLockOptimisticIf rs.RecordCount> 0 Then Map1.AutoRedraw = False rs.MoveFirst Dim lyr As MapXLib.Layer Dim ftr As MapXLib.Feature Dim obj As MapXLib.Feature Dim FId As Long Dim rvs As RowValues ​​Dim DS as mapxlib.dataset Dim OSTYLE ASTLE DIM ZI As Single Do Fid = 0 if map1.datas.count> 0 THEN SET LYR = Map1.Layers.Item (JDLYRNAME) SET DS = Map1.DataSets.Item (JDLyRName) for Each Obj IN Lyr.allfeatures (OBJ) IF TRIM (RVS.Item ("No.") .Value) = Trim (Str (RS! Orderno)) THEN FID = Obj.FeatureId EXIT for end if Next if FId <> 0 Then lyr.Selection.SelectByID FId, miSelectionNew 'intercept point numbered If lyr.Selection.Count> 0 Then Set oStyle = New style oStyle.TextFont.Size = 12 oStyle.TextFont.Bold = True oStyle.SymbolFontColor = vbwhite ostyle.textf OntbackColor = vbblue ostyle.textfontopaque = true

转载请注明原文地址:https://www.9cbs.com/read-104705.html

New Post(0)