[udig-devel] Problems adding generated shapefiles to a current map
in uDig 1.1 RC8
Schmitt, Magna (CIP)
M.SCHMITT at CGIAR.ORG
Wed Feb 7 06:27:46 PST 2007
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
More information about the udig-devel
mailing list