Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[udig-devel] Get feature on mousePressed method

Hi uDig'gers!

I have a Class that extend AbstractEditTool.	
I need to get the feature selected by clicking on the map, in the
method mousePressed of my class so that I can modify its attributes.

I have worked on the following code

IMap map = ApplicationGIS.getActiveMap();
FeatureSource source=map.getEditManager().getSelectedLayer().getResource(
FeatureSource.class,  new NullProgressMonitor());
FeatureCollection collection=source.getFeatures();

But it retuns all the features on Selected layer and not the 'Clicked'
single one.

Regards

Alessandro Sferrazza


Back to the top