I am trying to animate markers on particular latitude and longitude.. can someone tell me how can i do it?
function BouncePin() {
debugger;
var pin = new Microsoft.Maps.Pushpin(map.getCenter());
map.entities.push(pin);
Bing.Maps.Animations.PushpinAnimations.Bounce(pin);
}
Bounce: function (pin, height, duration) {
debugger;
height = (height && height > 0) ? height : 150;
duration = (duration && duration > 0) ? duration : 1000;
var anchor = pin.getAnchor();
var from = anchor.y + height;
pin.setOptions({ anchor: new Microsoft.Maps.Point(anchor.x, anchor.y + height) });
simpleAnimation(
function (progress) {
var delta = Math.abs(Math.cos(progress * 2.5 * Math.PI)) / Math.exp(3 * progress);
var y = from - height * (1 - delta);
pin.setOptions({ anchor: new Microsoft.Maps.Point(anchor.x, y) });
},
duration
);
}
Bing has helper methods to do this,BouncePin() function is plotting marker on the center of the mapView.. i want to animate on particular latitude and longitude.. Please help me with this..