0

i want to save map markers in a list to send their in a post method using "markerDragEnd" function .the polygon drew ,but the function does not fire . here is my html code

        <agm-map [latitude]="center.lat" [longitude]="center.lng" 
               (mapReady)="onMapReady($event)" style="height: 300px;"
               (mapClick)="mapClicked($event)">
         <agm-polygon #mPolygon [paths]="markers" [editable]="true"></agm-polygon>
         <agm-marker *ngFor="let m of markers; let i = index" [latitude]="m.lat" [longitude]="m.lng" 
            [label]="m.label" [markerDraggable]="true" (dragEnd)="markerDragEnd(m, $event)">
              <agm-info-window>
                <strong> Info Window content</strong>
              </agm-info-window>

            </agm-marker>
                </agm-map>**strong text**
         markerDragEnd(m, $event: any) {
             console.log('dragEnd', m, $event, this.mPolygon);
          }

0 Answers0