Good day.
I'm working on visual basic 6.2 and mapxtreme 2004. I'm currently trying to make the selectpolygon tool show me the info of all the points inside the polygon area.
The desktop application has several layers, one for each kind of locale (hotels, restaurants and so on), what I'm trying to do is allow the user to use a polygon to get all the available info on the locales that reside within the drawn polygon. Basically, an infotool that returns all the info of the points inside the drawn area.
I've coded a new button with the selectpolygon and added it to the toolbar. Also, I've defined a new function to handle the adressof call.
But now I'm kind of hazy as to how I can get the polygon object out of the tool, so I can run a sql query to get the info of the points. According to the reference guide, the selectpolygonmaptool namespace has a property named 'selection' which I guess would return the geometry object I need, but I just don't know how to access. Can you give me a few pointers on how I should do that? I include the button creation code for reference:

Dim mpoint As MapInfo.Tools.IMouseToolProperties = MapControl1.Tools.MouseToolProperties
Dim impoint As MapInfo.Tools.IMapToolProperties = MapControl1.Tools.MapToolProperties
Dim isel As MapInfo.Tools.ISelectMapToolProperties = MapControl1.Tools.SelectMapToolProperties
Dim selpol As New MapInfo.Tools.SelectPolygonMapTool( _
False, _
MapControl1.Tools.FeatureViewer, _
MapControl1.Handle.ToInt32, _
MapControl1.Tools, _
mpoint, _
impoint, isel)
MapControl1.Tools.Add("selpol", selpol)
AddHandler MapControl1.Tools.Used, AddressOf ToolUsed2
 

 Carlos Martín

 Supervisor de Informática

 tel.

+58

(241)

824-4443

 fax.

+58

(241)

824-5686

 cel.

+58

(414)

412-9170

 

 

 

 

 [EMAIL PROTECTED]

 http://www.logistica.com.ve

 

 
_______________________________________________
MapInfo-L mailing list
[email protected]
http://www.directionsmag.com/mailman/listinfo/mapinfo-l

Reply via email to