create_messages_layer
The create_messages_layer function is used to create a graphic layer using the coordinates from messages.
svc=render/create_messages_layer¶ms={"layerName":"<text>",
"itemId":<long>,
"timeFrom":<uint>,
"timeTo":<uint>,
"tripDetector":<bool>,
"trackColor":"<text>",
"trackWidth":<int>,
"arrows":<bool>,
"points":<bool>,
"pointColor":"<text>",
"annotations":<bool>,
"flags":<uint>}
You can't execute this request simultaneously with the following requests:
Parameters
Name | Description |
---|---|
layerName | Layer name. |
itemId | The ID of the unit, the messages of which should be requested. |
timeFrom | The beginning of the interval. |
timeTo | The end of the interval. |
tripDetector | The trip detection usage:
|
trackColor | The colour of the track in the ARGB format (A is the alpha channel or the transparency level) or "trip" for colouring tracks by trips ("tripDetector":1 is required). |
trackWidth | Track width in pixels. |
arrows | The arrows of movement direction:
|
points | Points at the places where messages were received:
|
pointColor | The colour of the points. |
annotations | The annotations for the points:
|
flags | The flags for displaying markers (optional parameter). |
The trackColor parameter examples:
Colour | Name | ARGB code |
---|---|---|
Opaque red. | "FFFF0000" | |
Semi-transparent green. | "7F00FF00" | |
Strongly-transparent blue. | "500000FF" |
Marker flags:
Flag | Value |
---|---|
0x0001 | Grouping markers. |
0x0002 | Numbering for markers. |
0x0004 | Event markers. |
0x0008 | Fuel filling markers. |
0x0010 | Image markers. |
0x0020 | Parking markers. |
0x0040 | Speeding markers. |
0x0080 | Stop markers. |
0x0100 | Fuel drain markers. |
0x0800 | Video markers. |
Returned result
{
"name":"<text>", /* layer name */
"bounds":[ /* layer bounds */
<double>, /* minimum latitude */
<double>, /* minimum longitude */
<double>, /* maximum latitude */
<double> /* maximum 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> /* maximum speed for interval */
}
],
"trips":[ /* only if tripDetector is 1 */
{
"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> /* maximum speed for interval */
"color":"<text>" /* interval colour in '#RRGGBB' format */
}
]
}
See also avl_render.
Possible error codes:
Code | Description |
---|---|
1004 | The limit of messages has been reached. |
1003 | The limit of layers has been reached. |
1001 | No messages to process. |
7 | Failed to fetch the resource with the desired ACL (ADF_ACL_ITEM_EXECUTE_REPORTS). |
6 | Undefined error. |
4 | Wrong input parameters. |