How to move an Overlay with animation in Openlayers 3?

المشرف العام

Administrator
طاقم الإدارة
I would like to animate a Overlay marker from one coordinate to another with a smooth movement.

In the last Overlay documentation:http://openlayers.org/en/v3.9.0/apidoc/ol.Overlay.htmlthere are autoPan & autoPanAnimation options, but it is not working for me as you can see here:http://jsfiddle.net/q2x4vf6x/2/

If I define the marker without those options the marker changes its position as expected, but without animation:

marker_pos = new ol.Overlay({ element: $('
') .css({marginTop: '-10px', marginLeft: '-10px', cursor: 'pointer'})});Am I missing something?



أكثر...
 
أعلى