map.getEditManager().addListener(new IEditManagerListener() {
public void changed(EditManagerEvent event) {
SimpleFeature feature= map.getEditManager().getEditFeature();
if(feature != null) {
FilterFactory factory = CommonFactoryFinder.getFilterFactory(GeoTools.getDefaultHints());
Id uDigfilter = factory.id(Collections.singleton(feature.getIdentifier()));
try {
FeatureCollection collection = dodStore.getFeatures(uDigfilter);
// do something with it
} catch (IOException e) {
e.printStackTrace();
}
}
}
});
...a summary of how-to-do-(mostly-GIS)-development-things in HortonMachine-gvSIG-Geopaparazzi-uDig-Eclipse-Java as they pass me by...
That's all folks... and code!
Friday, March 5, 2010
How to listen to a feature creation by an edit tool
Today Virginie BERRE of Magellium showed a nice way to catch a feature created with the editing tool in udig. Guess I have to post that here in order to remember it myself :)
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment