0

I am using https://angular-maps.com/docs/api/latest/ts/core/index/SebmGoogleMapPolygon-directive.html , for google map ,

  
      
       <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>
    

how can i get polygon object from click

  click($event: any) {
    console.log(event);

  }

1 Answers1

0

Pass the instance of the array in the event handler.

(polyClick)="click($event)" becomes (polyClick)="click(polygon)"

Jared
  • 702
  • 1
  • 5
  • 12