Визиком карты

getNearest

Searching of the nearest objects according to the given coordinates.

Request's scheme

Parameters

Parameter Description
<authority> contains unique identifier that defines access level to the service.
<database> database name to which inquiry is made.
<point> the parameter shows the point from which searching begins. Magnitude of radius attribute (in meters) shows region in which searching is made. If radius is absent, the nearest object will be displayed. The results shall be sorted according to the remoteness from the said point.
<layer> the layer in which searching of objects will be made. Please look at method getLayers for getting possible list of layers. Names and aliases of the layers can be specified.

Quantity of objects to be found is limited. If found objects meet the requirements of the searching but exceed allowed quantity (approximately 250 objects can be displayed), these objects will not be displayed as search result. The radius of buffer zone shall be not more then 25 km.

Examples

Request

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<request>
    <authority key="AUTHORITYKEY"/>
    <method name="getNearest"/>
    <parameters>
        <database>World_ru</database>
        <point
         lat="50.455189"
         lng="30.511414"/>
        <layer type="alias">Адреса</layer>
    </parameters>
</request> 

Response

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<response>
    <object>
        <name>25/2</name>
        <description>Киев, Большая Житомирская ул.</description>
        <id>8556180821302594</id>
        <distance>26.28067149</distance>
    </object>
</response> 


Attantion! Do not store ID, they depend on the date of modification database.