Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [udig-devel] GeoSelectionService, ISelectionService and Programmatically Creating Selection

Hi Tawan:

The idea of a global GeoSelectionService was proposed by another developer but not yet implemented. I think I myself know enough to implement it now.
I actually have the answer to this one since I was fussing over it with the the table of contents community module.

The workbench selection service is the way to go; the Map advertises what it is doing when the select tool is in use.
However that kind of changes depending on what tool the user is using.

You may also wish to listen to the map directly; the edit manager tracks the currently selected layer, and from there you can ask it for its current filter.

Jody

On 27/05/2010, at 8:38 AM, Tawan Banchuen wrote:

Hi uDigers,

I am trying to synchronize selection in my application (based on Tupelo, another RCP project) with map selection in uDig.  I am a bit confused about two different selection services in uDig: GeoSelectionService and ISelectionService.  Which one should I register my listener to?  Are you in the process of moving towards using GeoSelectionService for geo-objects selection?

If I should work with GeoSelectionService, the info I found below is not very useful  Is there a better documentation?

http://udig.refractions.net/confluence/display/DEV/03+GeoSelectionService

On the other hand, I can easily register my listener to ISelectionService following this document: 


I am also trying to find a selection tool for my uDig map view plug-in.  I could not find a modal tool for selection in the package: 

net.refractions.udig.tools.internal

Is there one?

I wonder whether this is the correct way to create a map selection programmatically: I create an OpenGIS filter and then send it to the map view as follows:

map.sendCommandASync(SelectionCommandFactory.getInstance().createSelectCommand(layer, filter))

As you can see, the SelectionCommandFactory class has been deprecated.  What class should I use?

Thanks bunches for your help.

Regards,
Tawan


_______________________________________________
User-friendly Desktop Internet GIS (uDig)
http://udig.refractions.net
http://lists.refractions.net/mailman/listinfo/udig-devel


Back to the top