[geotk] puzzle-gis lookup

sorel johann johann.sorel at geomatys.fr
Tue Aug 2 14:40:42 EDT 2011


Hi thys,

Macontext objects are not always loaded from the start since that may 
imply loading plenty of datastores or coverage readers.
Unfortunatly there are no lookup which contain all Mapcontext but I see 
three alternatives.

1 - You can acces the currents projects with :
GISProject project = OpenProjects.getDefault().getMainProject();
or Project[] projects = OpenProjects.getDefault().getOpenProjects();
and use project.getContexts() to get all MapContexts. and mess them as 
much as you want.

2 - Like above when you have the project you can get the Map folder object :
FileObject obj = project.getMapFolder(true);
and then attach a listener on this one to be noticed when a new 
mapcontext file is added.

3 - Make a patch for the GisProject lookup implementation to forward all 
events on creation/deletion of Mapcontexts ;-)

johann

On 02/08/2011 18:55, Thys Meintjes wrote:
> Hi All,
>
> I'm building a application on top of puzzle-gis. I want to add extra 
> layers to all MapContext's currently loaded in the puzzle-gis 
> application. Is there a convenient Lookup that
> has all instances of currently loaded mapContexts ? Maybe 
> all GISContextDataObject's are available in a lookup ?
>
> Thanks and regards
>
> -- 
> Thys Meintjes
>
>
>
> _______________________________________________
> Geotoolkit mailing list
> Geotoolkit at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/geotoolkit

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/geotoolkit/attachments/20110802/915ac1c0/attachment-0001.html


More information about the Geotoolkit mailing list