Answer the question
In order to leave comments, you need to log in
How to determine the city by clicking on it in Yandex maps?
There is a code that displays a map via api:
ymaps.ready(function () {
var myMap = new ymaps.Map('map', {
center: [55.751574, 37.573856],
zoom: 9
}, {
searchControlProvider: 'yandex#search'
});
myMap.events.add('click', function (e) {
var coords = e.get('coords');
$('#city-geo').val(coords);
});
});
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question