0.2.2 • Published 6 years ago

time-aware-polyline v0.2.2

Weekly downloads
98
License
ISC
Repository
-
Last release
6 years ago

Time aware polylines in javascript

The google encoded polyline algorithm converts location coordinates into an ascii string. We have extended the algorithm to convert location coordinates with time stamps into ascii strings. The time aware polyline is also available in python.

npm version Build Status Coverage Status

Time aware polylines can be used to mark time events on polylines, or run a trip replay, like in the HyperTrack dashboard.

Polyline with events

Install

$ npm i time-aware-polyline

Encoder

var polylineUtil = require('time-aware-polyline');

var 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']
]
polylineUtil.encodeTimeAwarePolyline(points);

Decoder

var polylineUtil = require('time-aware-polyline');

var polyline = 'spxsBsdb|Lymo`qvAx@TKvAr@K';
polylineUtil.decodeTimeAwarePolyline(polyline);

Testing

To run the tests, you will need to install npm. Use the following command to run the tests.

$ npm test
0.2.2

6 years ago

0.2.1

6 years ago

0.2.0

6 years ago

0.0.8

6 years ago

0.0.6

6 years ago

0.0.6-0

6 years ago

0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.2-0

6 years ago

0.0.1

6 years ago

0.1.19

7 years ago

0.1.18

7 years ago

0.1.17

7 years ago

0.1.16

7 years ago

0.1.15

7 years ago

0.1.14

8 years ago

0.1.13

8 years ago

0.1.12

8 years ago

0.1.11

8 years ago

0.1.10

8 years ago

0.1.9

8 years ago

0.1.8

8 years ago

0.1.6

8 years ago

0.1.4

8 years ago

0.1.3

8 years ago

0.1.2

8 years ago

0.1.1

8 years ago

0.1.0

8 years ago