Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[udig-devel] Error adding multiple layers at a time

Hi !
i'm encountering a problem adding a new layer by the following method:

ICatalog catalog = CatalogPlugin.getDefault().getLocalCatalog();

               // georessource list creation
               for (FeatureCollection featureCollection : fetList) {
                   if (featureCollection != null) {
IGeoResource resource = catalog.createTemporaryResource(featureCollection.getSchema()); FeatureStore fStore = resource.resolve(FeatureStore.class, ProgressManager.instance().get());
                       fStore.addFeatures(featureCollection);

                       liste.add(resource);
                   }
               }
               return ApplicationGIS.addLayersToMap(null, liste, -1);

The layer is still created, but with the name "new Layer" and without any Features inside. This problem seems to appear when I add two layers which have the same name... Here is the log :

org.eclipse.emf.common.util.BasicEList$BasicIndexOutOfBoundsException: index=0, size=0
   at org.eclipse.emf.common.util.BasicEList.get(BasicEList.java:352)
at net.refractions.udig.project.ui.internal.LayerGeneratedGlyphDecorator.generateDefaultIcon(LayerGeneratedGlyphDecorator.java:551) at net.refractions.udig.project.ui.internal.LayerGeneratedGlyphDecorator.generateIcon(LayerGeneratedGlyphDecorator.java:393) at net.refractions.udig.project.ui.internal.LayerGeneratedGlyphDecorator$2.refreshIcon(LayerGeneratedGlyphDecorator.java:183) at net.refractions.udig.project.ui.internal.LayerGeneratedGlyphDecorator$2.run(LayerGeneratedGlyphDecorator.java:156)
   at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)


Thanks before,
Jonathan

begin:vcard
fn:Jonathan Roques
n:Roques;Jonathan
org;quoted-printable:CS Communication & Syst=C3=A8mes;Division Espace
adr;dom:BP 15872 ;;5, rue Brindejonc des Moulinais ;Toulouse;;31506 
email;internet:jonathan.roques@xxxxxx
title;quoted-printable:Ing=C3=A9nieur Etudes et D=C3=A9veloppement
url:www.c-s.fr
version:2.1
end:vcard


Back to the top