S
S
Sergey Alpeev2014-07-31 10:03:07
Yandex maps
Sergey Alpeev, 2014-07-31 10:03:07

How to determine geo coordinates by Yandex API address?

Good afternoon ! Please tell me how can I make it so that by pressing the button the address is read from the container, the coordinates are determined and the mark is displayed on the Yandex map? I managed to make a standard example shown on the Yandex API website api.yandex.ru/maps/doc/jsapi/2.1/quick-start/tasks... and it turns out to determine the coordinates at api.yandex.ru/maps/doc/jsapi /2.1/ref/reference/geo... but I can't add 2 and 2 , I tried to pass the received coordinates to ymaps.Placemark , but it does not accept them, however, the coordinates come even if they are put into ymaps.Placemark manually (just numbers ) then it shows the place on the map

Answer the question

In order to leave comments, you need to log in

2 answer(s)
Y
Yuri Lobanov, 2014-07-31
@QTnub

If they had immediately issued an example, I would have helped earlier. You are doing everything right, only there is such a variable map, which you simply copied from the example, and you have it called myMap.
codepen.io/iiil/pen/jireh
See an example, though I changed the address to St. Petersburg, so look for the balloon in St. Petersburg :)

A
AlexCar, 2015-11-22
@AlexCar

And how to make the output of geo-coordinates so that they are visible to the user, remembered by the system in the cache when moving from page to page ...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question