From: Tom Hughes Date: Tue, 11 Jun 2019 21:33:07 +0000 (+0100) Subject: Round up the frame size for trace animations X-Git-Tag: live~3124 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/46e3d846747a8ed50b2fd29d1e162432fca38e7d?ds=sidebyside;hp=-c Round up the frame size for trace animations --- 46e3d846747a8ed50b2fd29d1e162432fca38e7d diff --git a/lib/gpx.rb b/lib/gpx.rb index cfc82eedb..0aa23ae0b 100644 --- a/lib/gpx.rb +++ b/lib/gpx.rb @@ -66,7 +66,7 @@ module GPX height = 250 delay = 50 - points_per_frame = num_points / nframes + points_per_frame = (num_points.to_f / nframes).ceil proj = OSM::Mercator.new(min_lat, min_lon, max_lat, max_lon, width, height)