original code from mapbox blog

https://www.mapbox.com/mapbox.js/example/v1.0.0/dynamically-drawing-a-line/