J
J
jasonOk2017-02-11 18:21:08
JavaScript
jasonOk, 2017-02-11 18:21:08

How to set a handler for markers in Yandex.Maps?

There is a button, by clicking on which a marker is added to the map, you can add any number of them.
I need to be able to do something with it when I change the coordinates of any of the markers (for example, the dragend event ). For example, change its icon.
How to implement so that there is one handler for all markers?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
F
freeExec, 2017-02-13
@freeExec

What is the problem or is this a trick question?

dragHandler = function(e) {
// меняем иконку
}
marker.events.add('[drag]', dragHandler);

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question