I am using angular google map
and I have an editable polygon in my template like following
<agm-map [latitude]="34" [longitude]="53">
<agm-polygon #polygon id="polygon" (polyMouseUp)="OnMouseUp($event)" [paths]="paths" [editable]="true"></agm-polygon>
</agm-map>
and in my typescript file I have
export class DistrictComponent implements OnInit {
@ViewChild('polygon') polygon:ElementRef;
constructor(
private el:ElementRef
) { }
ngOnInit() {
}
paths = [
{lat:34.0214,lng:50.1654},
{lat:34.023414,lng:50.23454},
{lat:34.45214,lng:50.45654},
{lat:34.5634,lng:50.345634},
{lat:34.45614,lng:50.14654}
]
}
how should I access to my path when I edited polygon by dragging and dropping points or by moving polygon?