Tell me, please, how can I get an address by geo coordinates?

Those. there are coordinates 30.524933, 50.447218 and you need to determine the address or object in this case - Ukraine, Kiev, metro Khreshchatyk. In Google searched, everyone is looking the other way around.

    2 answers 2

    Yandex maps have both direct and reverse geocoder. Direct - this is when the address is determined by the coordinates. Reverse, respectively, back. Here is a link to the documentation: geocode .

    Here is an example of using a geocoder both direct and reverse. Examples of using the JavaScript API .

    More examples:

       <script src="здесь_нужен_АПИ_ключ_яндекс_"></script> <script> var map; window.onload = function () { map = new YMaps.Map(document.getElementById("maps")); map.setCenter(new YMaps.GeoPoint(35.01, 48.47), 13); }; function go() { var res, rescont='Адрес для точки ('; var lat=$("#ilat").val(); var lng=$("#ilng").val(); rescont+=lat+', '+lng+') это: '; $.ajax({type: "GET", url: "", data:'geocode='+lng+','+lat+'&format=json&kind=house&results=2&key=_здесь_нужен_АПИ_ключ_яндекс_', dataType:"JSON", timeout:30000, async:false, error: function(xhr) { rescont+='Ошибка геокодирования: '+xhr.status+' '+xhr.statusText; }, success: function(html) { res=html; var geores=res.response.GeoObjectCollection.featureMember; if(geores.length>0) { for(k=0;k<geores.length;k++) { rescont+=geores[k]'; '; } } else { rescont+='нет данных'; } } }); $('#iout').text(rescont); map.setCenter(new YMaps.GeoPoint(lng,lat)); } </script>