Skip to content

Latest commit

 

History

History
30 lines (21 loc) · 1022 Bytes

README.md

File metadata and controls

30 lines (21 loc) · 1022 Bytes

Time Aware Polyline

This gem provides an implementation of the time aware polyline algorithm. The time aware polyline algorithm extends the polyline encoding algorithm in order to add support for timestamps.

Encoder

require 'time_aware_polyline'

points = [
  [19.13626, 72.92506, '2016-07-21T05:43:09+00:00'],
  [19.13597, 72.92495, '2016-07-21T05:43:15+00:00'],
  [19.13553, 72.92469, '2016-07-21T05:43:21+00:00']
]

TimeAwarePolyline.encode_time_aware_polyline(points)

Decoder

require 'time_aware_polyline'

TimeAwarePolyline.decode_time_aware_polyline('spxsBsdb|Lymo`qvAx@TKvAr@K')

Related Implementations