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 with:
paths: Array<LatLngLiteral> = [{lat: -12.052224, lng: -77.050342}, {lat: -12.064306, lng: -77.031790}, {lat: -12.075951, lng: -77.054554}, {lat: -12.063236, lng: -77.072506}, {lat: -12.052224, lng: -77.050342}];
Never update the paths variable whatever I do.
What am I failing? Why I can not get the final polygon with its respective paths and always get the initial? Or what is the correct way to get the new polygon?
This is my component:
<sebm-google-map [latitude]="lat" [longitude]="lng" [zoom]="zoom">
<sebm-map-polygon [paths]="paths" [editable]="true" [polyDraggable]="true" [strokeColor]="'#c60331'" (polyDragEnd)="onDragEnd($event, paths)">
</sebm-map-polygon>
</sebm-google-map>