Create track layer

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

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

:!: Current request can't be executed simultaneously with following requests:

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

Parameters

Name Description
layerName layer name
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
flags display markers flags (optional parameter)

Markers flags:

Flag Value
0x0001 grouping markers
0x0002 numbering for markers
0x0004 events markers
0x0008 fillings
0x0010 images
0x0020 parkings
0x0040 speedings
0x0080 stops
0x0100 thefts
0x0800 video markers

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 */
		}
	]
}

See also Get tiles of graphic layers.

Follow us on Facebook Gurtam Wialon Twitter Gurtam Wialon info@gurtam.com   |   Copyright © 2002-2024 Gurtam