I'm interested in programmatically finding out information of the features (of a map) under the mouse. I'm using GeoTools for drawing the map using a shapefile. I've first used the following code line by overriding onReportedUpdated().
InfoTool tool = new InfoTool() {
@Override
public void onReporterUpdated() {
String text = getTextReporterConnection().getText();
System.out.println(text);
}
};
But, here I get a full string with all information. Yet, I would like to individually find those feature information.
I've found this question, in which it is said that there's no direct API call for this. But since this is a quite old question, I would like to know whether there's any direct API methods to achieve this.