runExpressAfter property
First of all, let's explain how the location interpolation is done: since it's required a begin location and end location to geo-interpolate between them, the animation lasts according to the indicated duration. Meanwhile, when animation is running new location updates could be pushed to Location Queue, making it larger and larger and increasing the distance and delay between current animating location and real user one.
To reduce "traffic congestion" the runExpressAfter controls how much the Location Queue can grow applying a multipoint interpolation, instead of a linear interpolation between to points.
For instance, normal linear interpolation goes from P1
to P2
but multipoint interpolation
(using piecewise linear interpolation algorithm) goes over multiple point or nodes at once
(P1,P2,P3,P4,P5,P6...Pn) without any halfway stop just like a express train skipping local stops.
So, when the Location Queue's length reaches the runExpressAfter the Multipoint interpolation is activated, first clears and reset the queue, just then, "sew" through all the point at once. Finally, the normal linear interpolation takes control again, until the queue required to be purge again.+
This behavior is useful the user is moving fast, and many location updates are lagging in the queue waiting for the running animation to complete. Also, reduce stops making the whole animation smoothly.
During multipoint interpolation the bearing/heading angle is taken from the first and last position.
Default value: 10
Implementation
final int runExpressAfter;