How to move a point along a line?

1718
1
11-16-2018 10:44 AM
AbdulKhan
New Contributor II

I have a polyline showing a delivery route. How can I move/animate a point along the line from start to the end?

0 Kudos
1 Reply
deleted-user----ypwdOWHsd
New Contributor III

I think your best bet is some math and the update(x, y) method from Point. 

You have the two points that make the line, from the Polyline Object. You know that

y=mx+b, and m = (y2-y1)/(x2-x1)

so you can find the equation for the line. Then you can produce x values, and find the associated y values, and then use the update method to set the point. 

Low level graphics manipulation is a bit involved. Good luck man