[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [udig-devel] Problems adding generated shapefiles to a current map in uDig 1.1 RC8
|
Hi. Map factory is deprecated so I would suggest using the
ApplicationGIS.addLayersToMap() instead. That should hopefully fix
the problem.
Jesse
On 7-Feb-07, at 6:27 AM, Schmitt, Magna (CIP) wrote:
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
_______________________________________________
User-friendly Desktop Internet GIS (uDig)
http://udig.refractions.net
http://lists.refractions.net/mailman/listinfo/udig-devel