Fork me on GitHub

OpenLayers Bouncing markers

maker, bounce, animation

Add animations method on point features (OpenLayers.Feature.Vector.prototype.bounce).
The animation methods is designed to be used with externalGraphic (and backgroundGraphic). It will modify the graphicOffset of the marker.

The following example creates new features using a drop animation.
It adds a bouncy effect when moving the feature.

Feature can drop from the top of the map with a bounce or an elastic effect.
Feature can slide from the left with a bounce or an elastic effect.
Feature can be thrown from the top-left corner of the map.

Add new features on the map :

Click on the map to add new features!

Animate the feature when dragged :

Drag feature on the map to look the effect!


Shake the features on the map!