Answer the question
In order to leave comments, you need to log in
How to get the coordinates of the edited polygon vertex Yandex Maps API?
Good afternoon!
There is the following code:
var map = new ymaps.Map( ... );
var polygon = new ymaps.Polygon([outerBounds, []], {}, {
editorDrawingCursor: "crosshair",
fillColor: '#4B0082',
strokeColor: '#4B0082',
strokeWidth: 2,
fillOpacity: 0.2
});
polygon.editor.startEditing();
polygon.editor.events.add(['vertexdragend', 'vertexadd'], function(e){
console.log(e.get('...'));
});
map.geoObjects.add(polygon);
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