M
M
Makito2015-03-17 12:37:23
JavaScript
Makito, 2015-03-17 12:37:23

How to catch the polygon drawing end event (yandex maps v2.1)?

I am implementing a custom button element for drawing polygons on the Yandex map.
When the button is clicked, the following happens:

var shape = new ymaps.Polygon([], {}, drawOpts);
map.geoObjects.add(shape);
shape.editor.startDrawing();

What event to hang on the shape so that you can catch the end of the drawing of the polygon (closing the contour)?
Tried through the editorstatechange event, but there are side effects.
I would like it to be automatically caught, and not by clicking on the "Finish figure editing" button.
Google, for example, has an overlaycomplete event.

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