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.
...
},
"sensors": { // Sensor values.
"<sensor_id>": {
"value": <double|text>, // Sensor value.
"format": {
"value": <text> // Formatted sensor value with units of measurement.
}
}
},
"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.
}