coordinates_simple (gis_search)
To get the coordinates by specifying the address, use the following request:
https://search-maps.wialon.com/<host>/gis_search?country="<text>"®ion="<text>"&city="<text>"&street="<text>"&
flags=<uint>&count=<uint>&indexFrom=<uint>&uid=<long>
The
Parameters
The required parameters are marked with an asterisk (*).
Name | Description |
---|---|
country | Name of a country or its part. |
region | Name of a region or its part. |
city | Name of a city or its part. |
street | Name of a street or its part. |
flags* | Search and format flags. See the description below. |
count* | Output result count. |
indexFrom | Sequence number of the first result. |
searchFlags* | Additional search flags. See the description below. |
gis_sid* | Unique ID of the user session. |
uid | Current user ID. Deprecated, always use gis_sid. |
Search flags
Flag | Description |
---|---|
0x100 | Dump the path in the result. |
0x200 | Dump the map name in the result. |
0x400 | Dump the map coordinates in the result. |
0x800 | Do not create JSON. Return results as a list of objects. |
Flags
Flag | Description |
---|---|
0x0 | Search country. |
0x1 | Search region. |
0x2 | Search city. |
0x3 | Search street. |
0x4 | Search house. |
0x100 | Add fields with a formatted address path to the result. |
0x200 | Add the map name to the result. |
0x400 | Add coordinates to the result. |
Format flags are described here.
Error codes
Error code | Description |
---|---|
1 | Invalid session. |
4 | Wrong input parameters. |
6 | Unknown error. |
7 | Access denied, unknown search provider. |
Response
{
"items":[ /* array of results */
{
"name":"<text>", /* name of the search item*/
"map":"<text>", /* map name */
"x":<double>, /* longitude */
"y":<double>, /* latitude */
"path":"<text>", /* part of the address path, excluding the part placed in "name" */
"formatted_path":"<text>" /* address string formatted according to the flags */
}
],
"more":<uint> /* additional results: 0 - no, 1 - yes */
}