Answer the question
In order to leave comments, you need to log in
Find the nearest point by clicking on the yandex map?
Good afternoon geniuses, js, and especially yandex map api!
Faced a problem that with my knowledge of js can not be solved.
My task is the following, I have about 10 points (balloons) on the Yandex map and I need to find the closest one to me when I click on the button, the task is complicated by the fact that from the beginning I have to get my location:
navigator.geolocation.getCurrentPosition(showPosition);
function showPosition(position) {
var y = $('#avMyPosition').val(position.coords.latitude + ', ' + position.coords.longitude);
}
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