I
I
Ivan Antonov2015-06-19 12:41:07
JavaScript
Ivan Antonov, 2015-06-19 12:41:07

API Yandex Maps 2.1 how to get Placemark coordinates?

API Yandex Maps 2.1 how to get coordinates (longitude and latitude) of Placemark?

ymaps.ready(function() {
    var myMap = new ymaps.Map('map', {
      center: [56.28765400, 43.85762950],
      zoom: 10,
      controls: ['zoomControl', /*'searchControl', */'fullscreenControl']
    }),
    mark = new ymaps.Placemark([56.28765400, 43.85762950], {}, { draggable: 1 });
    myMap.geoObjects.add(mark);
    mark.events.add('drag', function(e) {
      // координаты нужны
    });
  });

Answer the question

In order to leave comments, you need to log in

1 answer(s)
F
forgotten, 2015-06-19
@antonowano

mark.geometry.getCoordinates()

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question