Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[udig-devel] Problems adding generated shapefiles to a current map in uDig 1.1 RC8

Hi:
I am working with uDig 1.1RC8 and i noticed that when I am trying to add a generated shapefile programatically, this shape does not load automatically. This only works well when I am overwriting and existing shapefile.
This is the method I use to add a shape to a current map: 

if (addToMap){    
             /** Adding the generated shape to the current map*/
             List<IService> shpServiceList;
             shpServiceList = new ServiceFactoryImpl().aquire(file.toURL());
             for( IService service : shpServiceList ) {
                 if (service != null) {
                     if (service.members(null) != null) {
                         try {
                             MapFactory.instance().process(null, service.members(null), false);
                             break;
                         } catch (Exception e) {
                             System.err.println(e.getMessage());
                         }
                         
                     }
                 }
             }
         }

Many thanks in advanced for your help in this,
Magna


Back to the top