我正在使用https://angular-maps.com/docs/api/latest/ts/core/index/SebmGoogleMapPolygon-directive.html,用于谷歌地图,
<sebm-map-polygon *ngFor="let polygon of polygonPathDatas"
[paths]="polygon.path"
[clickable] = "true"
strokeColor ="#00000"
[strokeWeight]=".6"
[editable]="false"
[draggable]="false"
(polyClick)="click($event)"
(polyDblClick)="delete($event)">
</sebm-map-polygon>
&#13;
如何从点击
获取多边形对象
click($event: any) {
console.log(event);
}
&#13;
答案 0 :(得分:0)
在事件处理程序中传递数组的实例。
(polyClick)=“click($ event)”变为(polyClick)=“click(polygon)”