You can buy this project and download/modify it how often you want.
<polyline> attributes 'onload' <polyline> getPoints() in 'onload' points provider polyline with insertItemBefore inserted point replaceItem replaced point initialize/appendItem intialized point appended point new Polyline polyline with