avl_hittest_pos

To get information about any item on a graphic layer by its coordinates, use the following request:

Copied!
http://<host>/avl_hittest_pos?sid="<text>"&lat=<double>&lon=<double>&scale=<uint>&
radius=<double>&layerName="<text>"

Parameters

The required parameters are marked with an asterisk (*).

Name

Description

sid*

Session ID.

lat*

Latitude.

lon*

Longitude. 

scale

Zoom: 0-17.

radius*

Search radius in degrees (like coordinates).

layerName

Layer name.

flagsLayer flags (see below). By default, all possible bits are set.

Flags

FlagDescription
0x10Use information from the marker layer.
0x20Use information from the message layer.
0x40Use information from the shape layer.

Response

For messages:

Copied!
{
	"type":"msg",		/* result type */
	"currMsg":{		/* current message */
		...
	},
	"prevMsg":{		/* previous message */
		...
	},
	"msgIndex":<uint>,	/* current message index */
	"unitId":<long>,	/* unit ID */
	"mileage":<double>,	/* mileage */
	"layerName":"<text>"	/* layer name */
}

The formats of the current and previous messages are described here.

For markers:

Copied!
{
	"type":"marker",	/* result type */
	"lat":<double>,		/* latitude */
	"lon":<double>,		/* longitude */
	"info":[{}],		/* information about the marker: depends on the marker type */		
	"layerName":"<text>",	/* layer name */
	"marker":"<text>"		/* additional information about the marker if available */
}

For geofences:

Copied!
{
	"type":"shape",		/* result type */
	"lat":<double>,		/* latitude */
	"lon":<double>,		/* longitude */
	"layerName":"<text>",	/* layer name */
	"shape":"<text>"		/* information about the geofence, for example, its name */
Download PDF file
Download Word document

See also