To get coordinates by specified address, use the request:
https://search-maps.example.com/{host}/gis_search?country=<text>®ion=<text>&city=<text>&street=<text>& flags=<uint>&count=<uint>&indexFrom=<uint>&uid=<long>
Note: {host} is usually hst-api.example.com.
You can find an example of this request in the sample Address and coordinates detection.
Parameters
Name | Description |
---|---|
country | name of a country or its part (optional) |
region | name of a region or its part (optional) |
city | name of a city or its part (optional) |
street | name of a street or its part (optional) |
flags | search and format flags (see below) |
count | output result count |
indexFrom | sequence number of the first result (optional) |
uid | current user ID |
Search flags:
Flag | Description |
---|---|
0x0 | search country |
0x1 | search region |
0x2 | search city |
0x3 | search street |
0x4 | search house |
0x100 | add fields with formatted address path into result |
0x200 | add map name into result |
0x400 | add coordinates into result |
Format flags are described in the chapter Address.
Response
{ "items":[ /* results array */ { "name":<text>, /* name of searching element */ "map":<text>, /* map name */ "x":<double>, /* longitude */ "y":<double>, /* latitude */ "path":<text>, /* part of address path, excluding part which placed in "name" */ "formatted_path":<text> /* formatted according to flags address string */ } ], "more":<uint> /* some more results: 0 - no, 1 - yes */ }