Every time I try to get the new polygon when I edit it, either by dragend or click, I always get the initial paths of my variable.
I initialize my paths variable wit
Late but I thought someone like me may get some help so adding the answer.
The current release doesn't support it so you will need to make some changes to the current node_module. See this url:
https://github.com/SebastianM/angular-google-maps/pull/991
willshowell has explained what needs to be done.
Steps:
Once you have made changes to Node Module, you can use the following code in the mouse up event of your PolyGon:
@ViewChildren(AgmPolygon)
polygonData: QueryList<AgmPolygon>;
polyMouseUp($event: any, index:number, polygon: any) {
var i =0;
this.polygonData.forEach(
x =>{
if(i==index){
x.getPath().then((y: any[]) => {
console.log('-');
y.forEach(z => console.log(z.lat(), z.lng()));
});
}
i++;
}
);
}