How to track the polygon change event?

417 Views Asked by At

I need to get the new coordinates of the polygon if the finish button was pressed. I applied pm:update, but this event is not triggered when rotating or moving the polygon. I also tried to use pm:action click, but this event does not give me the opportunity to get the coordinates of the polygon that I was changing.

1

There are 1 best solutions below

0
Falke Design On

Listen on the pm:edit event, it is fired directly after a change is happend.

polygon.on('pm:edit', (e)=>{
   console.log(e);
});