E
E
edmoiseenkoff2013-12-24 16:07:47
JavaScript
edmoiseenkoff, 2013-12-24 16:07:47

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);

Question: is it possible to somehow get the coordinates of (changed or added) vertices in the vertexdragend and vertexadd events?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
dimik, 2014-01-15
@edmoiseenkoff

The answer is in the API club

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question