Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [udig-devel] how to get the visible map reference?

This is gold! I was just about to start to despair about how a
IPartListener has to be used :)

Thanks,
Andrea


Jesse Eichar probaly wrote:
> 
> On 17-Feb-07, at 1:47 AM, Andrea Antonello wrote:
> 
>>> ApplicationGIS.getActiveMap() will return the visible map.
>>
>> :) What else to say... two weeks of intensive UDig and I got blind.
>>
>>> But for
>>> listening for changed map you have to register a part listener with the
>>> workbench.
>>>
>>> From your view:
>>> getSite().getPage().addPartListener( new IPartListener2() { ... } );
>>>
>>> something like that.
>>
>> Alright, I will explore this. Any example in the udig code doing this, I
>> could look at?
> 
> Hi andrea there are many I just added a code snippet with decent
> documentation about it.  You can find it here:
> 
> http://svn.geotools.org/udig/branches/1.1.x/udig/tutorials/net.refractions.udig.code.examples/src/net/refractions/udig/code/examples/.
> 
> 
> This is a plugin that you should have in your workspace under
> tutorials/net.refractions.udig.code.examples.
> 
> Jesse
> 


Back to the top