most likely repeats since you call the route Procedure within a timer. Do not do that. I would call the route calculation from a Button, once. Absolutely do not call route within the LocationChanged event.
The miles and time does appear; look at your Title bar, it just does not appear in the marker bubble. For a LineString to exist, the LineString must have two sets of coordinates; the present latitude and longitude AND the previous latitude and longitude. You call route somehow when you have only one latitude/longitude pair (probably because you use it in a timer event) , You call route before a second pair can be established. Take out the timer Block and you might have a better result.
I mentioned earlier “You only need to calculate the route once. You can move the route calculation out of the LocationChanged event and avoid continuous recalculation.”
You said you ‘put it under ScreenInitialize event’; I imagine by it you meant the call route Procedure. I can only guess because you are not sharing your code. If you call it in the screeninitialize, you call route before you have both an origin and a destination value; you have to have both.
You said “When I zoomed in, the linestring was shifting slightly. and then after some alternate shifting due to position,”; I expect the linestring will shift since you make calls to recenter the map.
If this were my problem, I would make a copy of the Project, then remove the timers and call the route Procedure from a Button from the copy and see what happens.
You adapted a tutorial for your purposes but did not realize the tutorial does things you should not do in YOUR app. You are also adapting a different tutorial (Algerian Pharmacy tutorial) that uses straight line distances to determine which, of a number of locations is the closest to you. You can do that but will have to significantly modify the code. Run the route Procedure to extract only the distance from several possible destination locations and place the distance to the locations. Do not plot the track each time you do that, you only need the track from the shortest distance location probably. Calculating the distances to several venues will probably post several tracks on the map if you use your existing code. You probably do not want to do that so will have to adapt the code to do what you want.
No one can test your app.
Experiment, make intermediate copies of your app so you can back out of new coding that might cause issues and you should be OK.
Oh. So your original issue was solved.