Route traveled

The HyperTrack mobile SDK collects location and activity data for your users. This data is available as various building blocks for your location features. One such building block is the time aware polyline, which stores the route traveled by your users.

Time aware polyline

The time aware polyline captures the locations and timestamps as a compressed string. The time aware polyline is based on Google's encoded polyline format, which stores static locations (without timestamps) in a string.


The above string captures the following location data. With this compressed format, thousands of location data is made available in a single API call. This string can be decoded to obtain location data whenever required.

    [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']

All route visualisations on HyperTrack are powered using the time aware polyline.


Noise filtering

Our real-time filtering removes noise, smoothens and improves accuracy of the location data. This ensures that distance metering can be accurate. Read more on how that works.

Example filtering

Decoding the polyline

The time aware polyline can be decoded to get the latitude, longitude and timestamp data of the location stream as given below. To decode, you can use our open source libraries in Python and JavaScript.

If your language of choice is not available, let us know and we would be happy to ship it quickly.

$ pip install time_aware_polyline
from time_aware_polyline import decode_time_aware_polyline

polyline = 'spxsBsdb|Lymo`qvAx@TKvAr@K'
decoded = decode_time_aware_polyline(polyline)
$ npm i time-aware-polyline
var polylineUtil = require('time-aware-polyline');

var polyline = 'spxsBsdb|Lymo`qvAx@TKvAr@K';

Try it out

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

var polyline = 'spxsBsdb|Lymo`qvAx@TKvAr@K';

Get polyline for an action

The Action HTTP entity can be used to represent routes that are useful for your workflow. For example, a sales visit can be an action, and for this action, you can obtain the time aware polyline and distance traveled.

API call HTTP method Request url
Get action details
curl ""
  -H "Authorization: token YOUR_SECRET_KEY"

Next up

Read about other building blocks, or learn what you can build with them.

results matching ""

    No results matching ""