Class: Warpaint::PointCollection

Inherits:
OrderedCollection show all
Defined in:
lib/warpaint/point_collection.rb

Instance Method Summary collapse

Methods inherited from OrderedCollection

#closest_to

Constructor Details

#initialize(time_adjustment = 0) ⇒ PointCollection

Returns a new instance of PointCollection.



5
6
7
8
# File 'lib/warpaint/point_collection.rb', line 5

def initialize(time_adjustment = 0)
  @time_adjustment = time_adjustment
  super
end

Instance Method Details

#add_track_point(point) ⇒ Object



10
11
12
# File 'lib/warpaint/point_collection.rb', line 10

def add_track_point(point)
  self[point[:time] + @time_adjustment] = { :lat => point[:lat], :lon => point[:lon] }
end