Geofences: detailed information

To get detailed information about specified geofences, use the command resource/get_zone_data:

svc=resource/get_zone_data&params={"itemId":<long>,
				   "col":[<long>],
				   "flags":<uint>}

Parameters

Name Description Comments
itemId resource ID
col array of geofences IDs optional
flags flags, that determine format
of result JSON
optional
by default 0x1С

Флаги “flags”:

Значение Описание
0x01 area
0X02 perimeter
0X04 boundary and center points
0X08 all points
0X10 basic properties

Response

[		/* array with geofences data */
	{
		"n":<text>,	/* geofence name*/
		"d":<text>,	/* description */
		"id":<long>,	/* zone id inside resource/account zone array  */
		"rid":<long>,	/* resource/account id */
		"t":<byte>,	/* type: 1 - line, 2 - polygon, 3 - circle */
		"w":<uint>,	/* line thickness or circle radius */
		"f":<uint>,	/* geofence flags (see below) */
		"c":<uint>,	/* color (ARGB) */
		"tc":<uint>,	/* text color RGB */
		"ts":<uint>,	/* font size */
		"min":<uint>,	/* show on map from this zoom */
		"max":<uint>,	/* show on map till this zoom */
		"i":<ushort>,	/* check sum of image (CRC16) */
		"path":<text>,	/* short path to default icon */
		"ar":<double>,  /* area */
		"pr":<double>,  /* perimeter */
		"libId":<long>,	/* id of icon library , 0 - id for default icon library */
		"jp":<JSON>,     /* custom JSON */
		"b":{		/* boundary */
			"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 */
			},
			...
		],
		"ct":<uint>,    /* creation time */  
		"mt":<uint>     /* last modification time */
	},
	...
]

Geofence flags “f”:

  • 0x10 – mandatory flag for using parameter line width
  • 0x20 – show shape,
  • 0x40 – do not simplify.
Follow us on Facebook Gurtam Wialon Twitter Gurtam Wialon info@gurtam.com   |   Copyright © 2002-2024 Gurtam