How can i update polyline routes with user live location

How can I update polyline routes with user live location without calling API again & again(API for getting polyline point). I can draw the polyline beetwine destination & user location. but when user moved I want to remove the moved point from polyline. any way to do this without call again api