Table of Contents

Update check points

To update the list of route check points, use the command update_checkpoints:

svc=route/update_checkpoints&params={"itemId":<long>,
				     "checkPoints":[{}]}

Parameters

Name Description
itemId route ID
checkPoints array of check points

Check points formats according to their type:

Check point from map
{
	"f":1,		/* point type */
	"n":<text>,	/* name */
	"y":<double>,	/* latitude */
	"x":<double>,	/* longitude */
	"r":<uint>	/* radius */
}
Check point from geofence
{
	"f":2,		/* point type */
	"n":<text>,	/* name */
	"gz":{		/* information about geofence */
		"n":<text>,	/* name */
		"d":<text>,	/* description */	
		"id":<long>,	/* ID */
		"t":<byte>,	/* type: 1 - line, 2 - polygon, 3 - circle */
		"w":<uint>,	/* line thickness or circle radius */
		"f":<uint>,	/* geofence flags */
		"c":<uint>,	/* color (ARGB) */
		"b":{		/* additional parameters */
			"min_x":<double>,	/* minimal longitude */
			"min_y":<double>,	/* minimal latitude */
			"max_x":<double>,	/* maximal longitude */
			"max_y":<double>,	/* maximal latitude */
			"cen_x":<double>,	/* longitude of center  */
			"cen_y":<double>	/* latitude of center */
		},
		"p":[		/* array of geofence points */
			{
				"x":<double>,	/* longitude */
				"y":<double>,	/* latitude */
				"r":<uint>	/* radius */
			}
		]
	}
}

Geofence flags are described in the chapter Geofences: detailed information.

Check point from POI

Has the same format as check points from map.

Check point from units
{
	"f":4,		/* point type */
	"n":<text>,	/* name */
	"u":<long>,	/* unit ID */
	"r":<uint>	/* radius */
}

Response

{
	"rpts":[	/* array of check points */
		{
			"n":<text>,	/* name */
			"f":<uint>,	/* type */
			"u":<long>,	/* unit ID, 0 - if check point is not of the type "check point from units" */
			"y":<double>,	/* latitude */
			"x":<double>,	/* longitude */
			"r":<uint>	/* radius */
		}
	]
}