Closed henoktsegaye closed 6 years ago
Hi @henoktsegaye !
When he/she drags the direction, you can get the information from (onChange)
event.
The event's payload likes the following picture:
The new event's payload, so you can save these waypoints
.
HTML
<agm-map>
<agm-direction ... [waypoints]="waypoints" (onChange)="dirChange($event)"></agm-direction>
</agm-map>
TS
waypoints: any = [];
dirChange(event: any) {
console.log(event);
this.waypoints = event.request.waypoints;
}
by the way i want to say that is a really good thing you done out there , i was wondering how to save a way points after some body drags the direction cause we don't want to start fresh next time , we wanted to show the way points he /she dragged