Open hamza005 opened 7 years ago
I have the same problem. Have you solved it yet? I also want to know what's the function 'Datamap.arc()' returns
Yes! Here is the code, you can use it. It will draw multiple arcs at the same time, and will remove them after a given time interval.
var arcs: any = []; arcs.push( { origin: { latitude: data.src.lat, longitude: data.src.lng, }, destination: { latitude: data.dst.lat, longitude: data.dst.lng, }, }, ); election.arc(arcs); election.svg.selectAll('path.datamaps-arc').transition() .delay(function (d) { return 50 * 20; }) .duration(800) .remove(); }
Hey, multiple arcs can be drawn statically. But in my case, i'm getting the real time data from a socket with latlongs. when a new arcs is drawn, it removes the previous arc weather it is not completed yet. may be its in the air yet.So what should i do to draw multiple arcs at the same time for all latlongs.