Marker Animation on polylines in JSF meshes
1 answer
I think you need this polyline animation with Primefaces GMap Polyline . If so, you can achieve this by getting a Polyline object in JavaScript, and then just pass that object to the above GMap (animation on a polyline) example.
function initMap(){
var gmap = PF('gmap').getMap();
var line = gmap.polylines[0];
animateCircle(line);
}
function animateCircle(line) {
var count = 0;
window.setInterval(function() {
count = (count + 1) % 200;
var icons = line.get('icons');
icons[0].offset = (count / 2) + '%';
line.set('icons', icons);
}, 20);
}
Just call javascript funtion from your code. Hope this helps someone.
+1
source to share