User Tools

Site Tools


Custom live polling service

The custom live polling service allows visualization of other user's positions using a custom webserver. The webserver implementation is not part of the Cartograph app.

The polling service regularly sends a HTTP request to the webserver which replies with a JSON reply containing the users' data.


  • Enable service: If check then the service will regularly poll the webserver.
  • Service url: The address of the webserver.
  • Polling interval: The webserver polling interval in seconds. On mobile devices it is recommended to keep this value as high as possible to reduce energy usage.
  • Draw track: If checked then the movement track of users is drawn in addition to their current position.

URL parameters

The following parameters are available for custom polling services Service url:

  • {tf}: The start UTC timestamp in seconds from which measurements are requested.


JSON data format

Cartograph expects a JSON formated reply on the polling request. Each user is a JSON array entry:

  • uid: A unique id for the user. This id has to be unique over the whole tracking session.
  • name: A name for the user which will be displayed in the Cartograph app.
  • type: The shape type drawn on the map. Can be either image or circle.
  • color: If the type is circle then the circle is filled with this color. The color should be in hexadecimal representation, for instance #FF0000 (red).
  • image: If the type is image then the URL stored in this field is used as the marker image in the map. For instance
  • pois: An array of tracking points for the user. Each tracking point can have the following fields:
    • time (required): The UTC timestamp of the measurement in seconds.
    • lat, lon (required): The position of the measurment in degrees.
    • alt: The altitude in meters.
    • hf: The heart frequency in beats per minute (BPM).
    • cad: The cadence in revolutions per minute.
  "name":"Test User",
  "name":"Other User",

If no tracking points are available for a user then an empty pois list has to be returned. If no entry is returned for a given user then it is assumed that the user has gone offline and it will be removed from the map view. The following JSON reply will for instance remove user “Other User” from the map but user “Test User” will remain on the map:

[{"uid":1,"name":"Test User","color":"#FF0000","image":"","type":"circle","pois":[[]]}]

If no users are online then an empty array must be retured. All eventually existing users will be removed from the map.

custom-live-polling.txt · Last modified: 2016/01/24 08:19 by