By definition, these functions has no output values:
* remove(graphic)
* removeAll()
* removeMany(graphics)
From my observation, they return before the graphics are actually removed. Geez, they should have used promise instead! If I want to do some geometric operations afterwards, how should I be notified when the graphics are actually removed?
Hi there,
You should listen to events on your graphics collection. You can capture them as shown below:
layer.graphics.on(["before-remove", "after-remove"], function(event){
// process your logic here before and after the graphic is removed
});
layer.graphics.on("after-remove", function(event){
// process your logic here after the graphic is removed
});