Polyline removing itself after a certain distance.


Hello, I am building an running app and am using a polyline to show where the user has ran, however when it gets to around 2.5/3 mile mark the polyline removes it self from the back, so when the run is finished the user can only see the last few miles and not the entire run, i have read through my code many many times and cannot figure it out, any help would be massively appreciated. My code is attached.




Polyline removing itself after a certain distance.
 
 
Q