Use stored lats/lons to draw trace images
This commit is contained in:
parent
ba732128a7
commit
6c6d306de9
1 changed files with 6 additions and 6 deletions
12
lib/gpx.rb
12
lib/gpx.rb
|
@ -98,9 +98,9 @@ module GPX
|
|||
|
||||
first = true
|
||||
|
||||
points.each_with_index do |p, pt|
|
||||
px = proj.x(p.longitude)
|
||||
py = proj.y(p.latitude)
|
||||
@actual_points.times do |pt|
|
||||
px = proj.x @lons[pt]
|
||||
py = proj.y @lats[pt]
|
||||
|
||||
if (pt >= (points_per_frame * n)) && (pt <= (points_per_frame * (n + 1)))
|
||||
pen.thickness = 3
|
||||
|
@ -155,9 +155,9 @@ module GPX
|
|||
|
||||
first = true
|
||||
|
||||
points do |p|
|
||||
px = proj.x(p.longitude)
|
||||
py = proj.y(p.latitude)
|
||||
@actual_points.times do |pt|
|
||||
px = proj.x @lons[pt]
|
||||
py = proj.y @lats[pt]
|
||||
|
||||
pen.line(px, py, oldpx, oldpy) unless first
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue