<p>I think we have one more issue with the points_per_frame calculation, which is visible in the following trace: <a href="https://www.openstreetmap.org/user/Waclaw1/traces/3014390" rel="nofollow">https://www.openstreetmap.org/user/Waclaw1/traces/3014390</a><br>
Parts of the trace are newer shown with black with thickness 3.</p>
<p><a target="_blank" rel="noopener noreferrer" href="https://user-images.githubusercontent.com/5842757/59306203-1664c380-8c9c-11e9-90aa-b5a26a067baf.gif"><img src="https://user-images.githubusercontent.com/5842757/59306203-1664c380-8c9c-11e9-90aa-b5a26a067baf.gif" alt="3014390" style="max-width:100%;"></a></p>
<p>The issue here is probably that the current points_per_frame logic only applies integer division, so that some points towards the end of a trace might be omitted. Could we change this to something like:</p>
<pre><code>      points_per_frame = (num_points / nframes.to_f).ceil
</code></pre>
<p>Result looks better then:</p>
<p><a target="_blank" rel="noopener noreferrer" href="https://user-images.githubusercontent.com/5842757/59305840-511a2c00-8c9b-11e9-80a6-2bd446083633.gif"><img src="https://user-images.githubusercontent.com/5842757/59305840-511a2c00-8c9b-11e9-80a6-2bd446083633.gif" alt="136" style="max-width:100%;"></a></p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/openstreetmap/openstreetmap-website/pull/2204?email_source=notifications&email_token=AAK2OLMZI5ZQEJ4JB2TWIM3P2AGP3A5CNFSM4HE2LHC2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODXOPIKY#issuecomment-501019691">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLJG36FRTNAAYIKZGATP2AGP3ANCNFSM4HE2LHCQ">mute the thread</a>.<img src="https://github.com/notifications/beacon/AAK2OLIJW64RUFDEL7JN5D3P2AGP3A5CNFSM4HE2LHC2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODXOPIKY.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/openstreetmap/openstreetmap-website/pull/2204?email_source=notifications\u0026email_token=AAK2OLMZI5ZQEJ4JB2TWIM3P2AGP3A5CNFSM4HE2LHC2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODXOPIKY#issuecomment-501019691",
"url": "https://github.com/openstreetmap/openstreetmap-website/pull/2204?email_source=notifications\u0026email_token=AAK2OLMZI5ZQEJ4JB2TWIM3P2AGP3A5CNFSM4HE2LHC2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODXOPIKY#issuecomment-501019691",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>