Table of Contents

Create track layer

To create a graphic layer based on coordinates from messages, use the command renderer/create_messages_layer:

svc=renderer/create_messages_layer&params={"lname":<text>,
					   "rname":<text>,
					   "itemId":<long>,
					   "timeFrom":<uint>,
					   "timeTo":<uint>,
					   "tripDetector":<bool>,
					   "trackColor":<text>,
					   "trackWidth":<int>,
					   "arrows":<bool>,
					   "points":<bool>,
					   "pointColor":<text>,
					   "annotations":<bool>}

:!: You can find an example of this request in the sample Messages.

Parameters

Name Description
lname layer name
rname renderer name (see Create image renderer)
itemId ID of unit which messages will be requested
timeFrom interval beginning
timeTo interval end
tripDetector use trip detector: 0 - no, 1 - yes
trackColor track color in ARGB format (A - alpha channel or transparency level)
trackWidth track line width in pixels
arrows show course of movement arrows: 0 - no, 1 - yes
points show points at places where messages were received: 0 - no, 1 - yes
pointColor points color
annotations show annotations for points: 0 - no, 1 - yes

Response

{
	"name":<text>,		/* layer name */
	"bounds":[	/* layer bounds */
		<double>,	/* minimal latitude */
		<double>,	/* minimal longitude */
		<double>,	/* maximal latitude */
		<double>	/* maximal longitude */
	],
	"units":[{		/* array of units */
		"id":<long>,		/* unit ID */
		"msgs":{		/* information about messages */
			"count":<uint>,		/* messages count */
			"first":{		/* first message */
				"time":<uint>,		/* time */
				"lat":<double>,		/* latitude */
				"lon":<double>		/* longitude */
			},
			"last":{		/* last message */
				"time":<uint>,		/* time */
				"lat":<double>,		/* latitude */
				"lon":<double>		/* longitude */
			}
		},
		"mileage":<double>,	/* mileage for interval (metres) */
		"max_speed":<unit>	/* maximal speed for interval */
	}]
}