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)
2 Open the two ways of the map A, open the onset map map1.geoseet = "c: /aa.gst" On the map, you can add color, marking, restriction marked font, color, etc. These can only be saved to the map set, and cannot be saved to a single layer. So I suggest you make the layer to map, so it is very convenient to open or display. b, open layer for i = 1 to Ubound (navigation_defaultmap_path) map2.Layers.add navigation_defaultmap_path (i), i next3 Add Data Set MapX map and data is separated, you want to make a special map, see the contents of the table, Take the data of the primitive, you must first add the data set. a, add a layer dataset set lyr = curmap.layers (layerlist.text) Curmap.DataSets.add Midatasetlayer, Lyr, Lyr.Name B, add custom dataset The following functions are adding a dataset, SQLSTR is a SQL statement, DSNAME is the name of the dataset. Note: "ORDERNO" is the association of the data set I have taken in the database and the map element. Private function addjdds (Sqlstr as string, dsname as string) AS Booleandim isright as booleanism = false '---------------------- Add Data Set ON Error Goto themedcreate' ------------ Whether the data set DIM DS AS MAPXLIB.DATASETS IF DS.NAME = DSNAME THEN MAP1.DATAME = DSNAME THEN MAP1.DATASTS.REMOVE (DSNAME) 'Delete Data Set EXIT For End If Next Set DS = Nothing '------------------ Add Data Set -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- -------- Dim Cn As New ADODB.Connection Dim Cmd As New ADODB.Command Dim rs As New ADODB.RecordsetDim BindLyr As New BindLayerCn.CursorLocation = adUseClientCn.Open ConStrSet cmd.ActiveConnection = Cn