[OpenLayers-Users] Drag cancellation ?

Eric Lemoine eric.c2c at gmail.com
Mon Jan 7 10:20:47 EST 2008


On Jan 7, 2008 1:56 PM, Attila Csipa <plists at prometheus.org.yu> wrote:
> On Monday 07 January 2008 12:39:30 Eric Lemoine wrote:
> > > > Off the top of my head: you could try to erase the feature before
> > > > calling layer.redraw() in the onComplete() callback. To erase the
> > > > feature use feature.layer.eraseFeatures([feature]).
> > >
> > > one feature with one geometry. The magic line in onComplete (before
> > > restoring the original geometry) thus is:
> > >
> > > feature.layer.renderer.eraseGeometry(feature.geometry);
> >
> > The line I gave you does just the same in this case I guess.
>
> Almost - the dragged feature is not a copy, so if you do removeFeatures() it's

I never suggested to use removeFeatures(). I mentioned eraseFeatures()
if I recall correctly :-)

--
Eric



More information about the Users mailing list