create_zone_by_track
The create_zone_by_track function is used to create geofences from tracks.
svc=resource/create_zone_by_track¶ms={"layerName":"<text>",
"itemId":<uint>,
"unitId":<uint>,
"n":"<text>",
"c":<int>,
"w":<int>
}
Parameters
Name | Description |
---|---|
layerName | Track layer name. |
itemId | Resource ID. |
unitId | Unit ID. |
n | Geofence name. |
c | Colour (ARGB). Optional. The default value is 0x009933. |
w | Line thickness. Optional. The default value is 100. |
Returned result
{
"all_zones":<uint>, /* the number of new geofences (the maximum number of points in one geofence is 10000) */
"created_zone":<uint> /* the number of created geofences */
}
Possible error codes:
Code | Description |
---|---|
7 | Failed to fetch the resource with the desired ACL (ADF_ACL_AVL_RES_EDIT_ZONES). |
6 | Failed to fetch the renderer or no geofences created. |
4 | Failed to get messages or wrong input parameters. |