<agm-map
[zoom]="mapConfig.zoom" [styles]="mapConfig.styles"
[latitude]="currLate" [longitude]="currLongi"
>
<agm-direction *ngIf="path"
[origin]="path.origin"
[destination]="path.destination"
[waypoints]="waypoints"
></agm-direction>
</agm-map>
This is my code for implementing directions using Angular Google maps.
I gave origin,destination and array of waypoints, the problem is that when i create new route, both old and new routes stays on the maps.
But I want to reset/clear the directions so that i can show only the new direction route on the map.