Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [udig-devel] programmatically selecting features for highlighting

The name is of setFilter regarding selection was in hind sight a poor decision because it implies that the features rendered will be filtered. Instead the 'non-filtered' features (IE features that match the filter) are considered to be the selection. There is the start of a SelectionManager that will in the future help this situation. But for now Filter.ALL means filter everything (match nothing) and Filter.None means filter nothing. I think newer versions of Geotools have changed this to Filter.Include and Filter.Exclude.

So set a bounding box filter on the layer and all features within that bounding box are considered selected.
On 24-Oct-08, at 5:04 PM, Matthias Lendholt wrote:

Jesse Eichar schrieb:
The Table view simply tracks changes to the filter on the selected layer. You can put a filter on a layer. There should be a command available to do this. Look for something like SetFilterCommand or something similar.

FidFilter ff = FilterFactoryFinder.createFilterFactory().createFidFilter(fid); map .sendCommandASync (SelectionCommandFactory.getInstance().createSelectCommand(layer,ff));

the map renders but nothing is selected.

This should work if the fid is correct. Becareful though because often the FID changes after a commit.

Jesse



Back to the top