Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [udig-devel] listening for a layer removal

Hi there are 2 types of listeners you can add to a map.  An IMapListener and a IMapCompositionListener.  You want to use the latter.

Jesse

On 13-Jul-06, at 4:25 PM, Lewis H. Fishgold wrote:

Hi, I am wondering how to listen for a layer being removed from a map. I’ve tried this:

 

                ApplicationGIS.getActiveMap().addMapListener(new IMapListener() {

                    public void changed( MapEvent event ) {

                        if(event.getType().equals(MapEventType.MAP_COMMAND)) {

                            //I want to get more specific info about the event?

                        }

                    }

                });

 

Which lets me know when a map command has been executed, but I am not sure how to see if the command corresponded to the

removal of a layer. Thanks for your help.

 

Lewis

_______________________________________________
User-friendly Desktop Internet GIS (uDig)


Back to the top