avl_hittest_pos
To get information about any item on a graphic layer by its coordinates, use the following request:
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. |
flags | Layer flags (see below). By default, all possible bits are set. |
Flags
Flag | Description |
---|---|
0x10 | Use information from the marker layer. |
0x20 | Use information from the message layer. |
0x40 | Use information from the shape layer. |
To get marker (POI) information, specify the POI icon coordinates and any radius. In the case of a geofence or a circle-shaped marker, specify the coordinates within its shape and any radius.
Response
For messages:
{
"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:
{
"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:
{
"type":"shape", /* result type */
"lat":<double>, /* latitude */
"lon":<double>, /* longitude */
"layerName":"<text>", /* layer name */
"shape":"<text>" /* information about the geofence, for example, its name */