POIs: create, edit, delete

To create, edit or delete POIs, use the command resource/update_poi:

svc=resource/update_poi&params={"itemId":<long>,
				"id":<long>,
				"callMode":<text>,
				"n":<text>,
				"d":<text>,
				"y":<double>,
				"x":<double>,
				"r":<uint>,
				"f":<uint>,
				"c":<uint>}

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

Parameters

Name Description
itemId resource ID
id POI ID
callMode action: create, update, delete
Parameters required only for create and update:
n name
d description
y latitude
x longitude
r radius, m
f flag: 1 - show circle, 0 - hide
c color RGB

Response

On create and edit:

[
	<long>,		/* POI ID */
	{
		"id":<long>,	/* POI ID */
		"n":<text>,	/* name */
		"y":<double>,	/* latitude */
		"x":<double>,	/* longitude */
		"t":<double>,	/* aspect ratio of the image */
		"i":<ushort>,	/* check sum of image (CRC16) */
		"e":<ushort>	/* check sum of POI (CRC16) */
	}
]

On delete:

[
	<long>,		/* POI ID */
	null
]

Errors

Code Value
1 invalid session
2 invalid service name
3 invalid result
4 invalid format or value of parameters
6 - POI with current ID doesn't exist
- error deleting POI
7 - access denied
- service is not activated
Follow us on Facebook Gurtam Wialon Twitter Gurtam Wialon info@gurtam.com   |   Copyright © 2002-2024 Gurtam