MapWindow 4 - ActiveX Control Programming : MapWindow Discussion Forum
I am trying to read the attributes of features whenever I click on them (by code in C# or VB). Here is my code: private void map1_SelectionChanged(object sender, EventArgs e) { MapWindow.Data.IFeature feat = map1.GetFeatureLayers()[0].DataSet.GetFeature(index
Getting a Feature's attribute when clicked upon (by code) - HELP NEEDED URGENTLY
Posted by: dropsyy ()
Date: May 04, 2011 02:50AM

I am trying to read the attributes of features whenever I click on them (by code in C# or VB). Here is my code:

private void map1_SelectionChanged(object sender, EventArgs e)
{

MapWindow.Data.IFeature feat = map1.GetFeatureLayers()[0].DataSet.GetFeature(index)

}

the problem is that the eventArgs - e, does not give me the selected index of the feature that was clicked upon. If I change the value of 'index' above to a number, say 21, I actually get the feature with index of 21 and from them I could get the recordset to display on a form; which is really what I am interested in. PLZ help. I am stuck.

Sorry, only registered users may post in this forum.





Banner Exchange




GISCP.com




Send us your banner logo (160x120) for the space above, and add this MapWindow banner ad to your site:

Just paste this text in your page: