Apply MapX programming to implement map data query

zhaozj2021-02-16  46

0, review

It is not difficult to apply MAPX control to implement queries. Mapx provides us with objects such as Find, FindFeature, which can be used to implement the features we need :)

1. This program implements a node from the table, and performs positioning with this node (the instance is inquired by the value of the first layer RTuname property)

Private Sub Command1_Click () DIM FINDOBJ AS MAPXLIB.FIND DIM FOUNDFEATURE AS FindFeature 'Generates a Find object from the RTU layer to query, and set the findDataSet to be queried for this object, Findfield property set Findobj = form1.map1.Layers.Item 1) .find set Findobj.FindDataSet = form1.map1.datasets ("RTU Node" & "Dataset") SET FINDOBJ.FINDFIELD = Findobj.FindataSet.Fields ("RTuname") setfact fallen = Findobj.Search (Combo1.Text) Me.hide 'Turn off AutoRedRAW is because Centerx (Y) changes to refresh the layer. If the AutoRedRAW opens, it will cause secondary refresh form1.map1.AutoredRAP = FoundFeature.Centerx Form1.map1.Centery = FoundFeature.Centery form1.show end sub

2, slightly rewrite the above program, implement the function of query positioning according to the field input by the user:

Private sub fascist2_click ()

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

New Post(0)