我正在尝试通过执行回调来更新标记位置,因为路径的位置已更改。最好的方法是什么?
path
.attr("stroke-dasharray", totalLength + " " + totalLength)
.attr("stroke-dashoffset", totalLength)
.transition()
.CALLBACK_I_WANT(function(a) {
UPDATE_MARKER(a)
})
.duration(10000)
.ease("linear")
.attr("stroke-dashoffset", 0);
我希望标记看起来像这样:
http://zevross.com/blog/2014/09/30/use-the-amazing-d3-library-to-animate-a-path-on-a-leaflet-map/