<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Hi thys,<br>
<br>
Macontext objects are not always loaded from the start since that
may imply loading plenty of datastores or coverage readers.<br>
Unfortunatly there are no lookup which contain all Mapcontext but I
see three alternatives.<br>
<br>
1 - You can acces the currents projects with :<br>
GISProject project = OpenProjects.getDefault().getMainProject();<br>
or Project[] projects = OpenProjects.getDefault().getOpenProjects();<br>
and use project.getContexts() to get all MapContexts. and mess them
as much as you want.<br>
<br>
2 - Like above when you have the project you can get the Map folder
object :<br>
FileObject obj = project.getMapFolder(true);<br>
and then attach a listener on this one to be noticed when a new
mapcontext file is added.<br>
<br>
3 - Make a patch for the GisProject lookup implementation to forward
all events on creation/deletion of Mapcontexts ;-)<br>
<br>
johann<br>
<br>
On 02/08/2011 18:55, Thys Meintjes wrote:
<blockquote
cite="mid:CAHRf99ksm2Lp+TEXdEZuAK3jWG-nfMayjcOU534fxw0-yNuZaQ@mail.gmail.com"
type="cite">Hi All,
<div><br>
</div>
<div>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 </div>
<div>
has all instances of currently loaded mapContexts ? Maybe
all GISContextDataObject's are available in a lookup ?</div>
<div><br>
</div>
<div>Thanks and regards<br clear="all">
<br>
-- <br>
Thys Meintjes<br>
<br>
<br>
</div>
<pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
Geotoolkit mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Geotoolkit@lists.osgeo.org">Geotoolkit@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/geotoolkit">http://lists.osgeo.org/mailman/listinfo/geotoolkit</a>
</pre>
</blockquote>
<br>
</body>
</html>