Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [udig-devel] Listener doesn't register the first time

You can trigger a refresh manually by map.getRenderManager().refresh().
Jesse

Tiago Silva wrote:

Hi,
I've managed to register and listen for the changes in the map. My plugin is now notified whenever the map is rendered. However I need to add and remove listeners whenever different maps are opened and closed. Here are the steps: - Check open maps to see if at least one is open (ApplicationGIS.getOpenMaps())
- If map changed then remove the listeners from the previous maps
- If there are maps then register a listener in the active map and save a copy of the map However the listeners only activate when the map is refreshed.. for example: I open up a map, and nothing happens, I open up another and nothing happens, but when I come back to the first one, the listeners are working... like they were in a queue waiting to be registered... Does anything like this happen? If so, is there anyway to trigger a manual refresh? Thanks in advance,
Tiago Silva

------------------------------------------------------------------------

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



Back to the top