Ticket #110 (closed feature: fixed)

Opened 6 years ago

Last modified 4 years ago

animated panning

Reported by: sderle Owned by: metacarta
Priority: critical Milestone: 2.6 Release
Component: Map Version:
Keywords: Cc:
State: Complete

Description

all of the other mapping services smoothly pan from point (a) to (b) ... why not OL?

Attachments

animatedPanning.patch Download (4.7 KB) - added by euzuro 5 years ago.
patchification of code from portugal.. thanks duarte for the leads!
animatedPanning#2.patch Download (13.1 KB) - added by emanuel 5 years ago.
fix bug in layers.js; add unit tests
patch-110-r5555-A0.diff Download (9.3 KB) - added by pgiraud 4 years ago.
path including a new panTo method, tween and ease methods
patch-110-r5796-B0.diff Download (9.4 KB) - added by pgiraud 4 years ago.
110-r5796-C0.diff Download (6.0 KB) - added by crschmidt 4 years ago.
110-6099-C1.diff Download (6.0 KB) - added by crschmidt 4 years ago.
110-6099-C2.diff Download (6.0 KB) - added by crschmidt 4 years ago.
use new 'caller' instead of 'source'
animated_panning.patch Download (17.4 KB) - added by crschmidt 4 years ago.

Change History

Changed 6 years ago by euzuro

  • milestone Farallon Islands deleted

Changed 6 years ago by sderle

  • milestone set to 2.3 Release

Changed 5 years ago by euzuro

  • milestone changed from 2.3 Release to 2.4 Release

Changed 5 years ago by euzuro

From legwork done by Duarte C.:

Here is a link with a working example:
http://sigims.edia.pt/gmaps/final/openlayers_page.html

There is a function that determines how the slide is calculated - if
it's smoother, linear, exponential, etc. At this time it's a power
curve, so initially the movement is bigger and then slows down. This can
be changed by using other curves, as can be seen in moofx
(http://moofx.mad4milk.net/).

<snip>

Finally, you should be aware that I perused an example of animation in
www.hesido.com. It seems free since he encourages others to use the
examples and that's just what I did.

Changed 5 years ago by euzuro

and later from Brian L

One thing if I may suggest is to build the slide capability as a property of
the Map.  Thus allowing the slide enablement and effect to be set through
properties of the Map instead of the control.  In this case any standard or
custom control performing a map movement operation (pan, setCenter) can take
advantage of the slide effect when enabled.  Thanks for your contribution!

Changed 5 years ago by euzuro

  • keywords review added

Changed 5 years ago by euzuro

patchification of code from portugal.. thanks duarte for the leads!

Changed 5 years ago by euzuro

  • milestone changed from 2.4 Release to 2.5 Release

Changed 5 years ago by emanuel

fix bug in layers.js; add unit tests

Changed 5 years ago by emanuel

 Demo with animated zooming ( #442)

Changed 5 years ago by jrf

  • keywords review, integrate into trunk added; review removed
  • priority changed from minor to blocker

Changed 5 years ago by crschmidt

  • keywords review added; review, integrate into trunk removed
  • owner changed from sderle to metacarta
  • priority changed from blocker to critical

Changed 5 years ago by euzuro

  • milestone changed from 2.5 Release to 2.6 Release

Changed 4 years ago by crschmidt

  • state changed from Review to Needs More Work

This code needs to be cleaned up: There are a couple things in the patch that are totally unrelated to panning/zooming, which should be removed, and it needs updating to trunk.

Changed 4 years ago by pgiraud

path including a new panTo method, tween and ease methods

Changed 4 years ago by pgiraud

Proposed patch includes a new panTo method. Tween and Ease object are supposed to be generic and useful for other purposes.

Changed 4 years ago by pgiraud

  • state changed from Needs More Work to Review

Patch updated with issues fixed and panTo used in the overviewmap control.

Changed 4 years ago by pgiraud

Changed 4 years ago by pgiraud

  • state changed from Review to Needs More Work

Enhancement : panTween need to be stopped in case user drags the map manually before the animation is finished.

Changed 4 years ago by elemoine

Pierre, I've just applied your patch to trunk and the tween.html example gives me errors:

callback.call is not a function

Changed 4 years ago by crschmidt

Changed 4 years ago by crschmidt

  • state changed from Needs More Work to Review

Add version of animated panning:

  • With cancel-on-drag support
  • With pan as a wrapper for panTo
  • With a more fun example (dancing map!)

Pierre, I'd love if you could take a look at this. It depends on the patch I've uploaded for 962, and your approval of 1308, which I'm set with.

Changed 4 years ago by crschmidt

Oh, and it's available for demo/playing in:

 http://dev.openlayers.org/sandbox/crschmidt/animated_panning/

Changed 4 years ago by pspencer

There seems to be something wrong with normal panning ... if you just pan the map (in Safari and FF2), the point under the mouse smoothly scrolls to the center after you drop it?

Changed 4 years ago by crschmidt

It's a bug in the Click Handler, not the panning code; expect a patch in trunk before the night is out.

Changed 4 years ago by crschmidt

(In [6067]) Merge from 6030:HEAD from trunk, primarily to fix up fix to Handler.Click (See #110)

Changed 4 years ago by crschmidt

Changed 4 years ago by crschmidt

New title ("Animated Panning", instead of tween)

Changed 4 years ago by crschmidt

use new 'caller' instead of 'source'

Changed 4 years ago by crschmidt

Changed 4 years ago by pgiraud

  • state changed from Review to Commit

This is ready for commit now. All tests pass under FF2 and IE6.

One last note, I would have preferred something named 'animate' instead of 'immediate' and given a true value by default, because it's easier to understand I think. However, you can commit this.

Changed 4 years ago by crschmidt

  • status changed from new to closed
  • state changed from Commit to Complete
  • resolution set to fixed

(In [6111]) Add support for animated panning, with most of the work done by Pierre, thx pierre! panTo method now animates when moving. (Closes #110)

Note: See TracTickets for help on using tickets.