[OpenLayers-Dev] tween, panTo, animated panning
eric.c2c at gmail.com
Wed Jan 30 17:09:45 EST 2008
On Jan 28, 2008 1:57 PM, Pierre GIRAUD <bluecarto at gmail.com> wrote:
> Hello all,
> I'm still working on the animated panning feature and I think I'm
> facing some new problems.
> This morning I created a new ticket with an attached patch to first
> get the tween thing into trunk separately.  I would be pleased if
> Paul can have a look at this. Review of the code from other developers
> is also welcome.
> Now looking at the implementation of the tween class into a new panTo
> method, which at first looked easy to me, I'm stuck with the setCenter
> complexity issue .
> I thought I was almost finished with the panTo method with a simple
> call to setCenter with the dragging parameter.  It was working well
> but I then noticed issues if the user drags the map while the
> animation is playing. We need to be able to call stop on the animation
> to cancel it. In my opinion, this needs to be done in the setCenter.
> However, I can't find an easy (quick) way to tell setCenter whether to
> stop the animation or not. The idea of a caller parameter would suit
> this well.
> I think that I know need help to implement the moveTo method initially
> proposed by Chris.
>  http://trac.openlayers.org/ticket/1308
>  http://trac.openlayers.org/ticket/967
>  http://trac.openlayers.org/ticket/110
If I understand you correctly, in the general case setCenter will be
called with the cancelTween option set to true. However, the eachStep
callback in panTo will pass cancelTween:false to setCenter. Am I
Based on Chris' proposal for #967, we should be able to add this
cancelTween option to setCenter.
More information about the Dev