T
T
tappa2019-08-22 16:55:37
Yandex maps
tappa, 2019-08-22 16:55:37

How to get coordinates or id by clicking on a geo object in Yandex.Maps?

Hello.
I have objects on the map specified through geoCollection.
There is a need to get the coordinates by clicking on a label from the collection. Tried by analogy with myPlacemark

myMap.geoObjects.events.add('click', function (e) { 
      var object = e.get('coords'); 
});

but in the console it gives an error of the absence of the converter method (or something similar).
How to get the coordinates, or at least the ID of the object?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question