N
N
Nikita Kit2017-03-29 16:01:24
JavaScript
Nikita Kit, 2017-03-29 16:01:24

How to get the address of the coordinates of a point from the Yandex.map server?

Given:
There are coordinates of the user clicking on the map, a point with coordinates.
It is necessary:
​​Translate the coordinates into a readable address.
It would seem that the geocoder can. I send him get.

https://geocode-maps.yandex.ru/1.x/?format=json&geocode='+[
            coords[0].toPrecision(6),
            coords[1].toPrecision(6)
            ].join(', ')+'&ll='+[
            coords[0].toPrecision(6),
            coords[1].toPrecision(6)
            ].join(',')

In response, I get several pairs of some coordinates and nothing more.
There are stupidly NO examples of translating data from coordinates to an address in the documentation!
"With reverse geocoding, the request specifies the coordinates of the object you are looking for, and the response will return its address."
I throw coordinates in geocode... I receive coordinates. I throw in &ll coordinates.... I receive coordinates.
Do they have a server down there???

Answer the question

In order to leave comments, you need to log in

1 answer(s)
U
Urvin, 2017-03-29
@ShadowOfCasper

ll is used in conjunction with spn and these parameters are not needed at all in your request.
An example of reverse geocoding lies right on the main page in the "How it works" section.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question