Open brendan343 opened 1 year ago
Same here. Any update?
Update:
Unfortunately I am still unable to display multiple routes at once. My workaround at the moment is to have to map-renderer lines (1 for transit and the other for driving).
I had my sidebar to toggle the provided alternative routes for transit so at least the polylines are refreshed for each route. Didnt really solve the problem but at least its displaying the different polyline for each route.
Hope others have better luck than me!
Is this a regression?
The previous version in which this bug was not present was
No response
Description
hi real beginner here with this but i'm trying to display all the routes on the maps using the below as per the documentation within the html:
<map-directions-renderer *ngIf="(dResultTransit | async) as directionsResults1" [directions]="directionsResults1"></map-directions-renderer>
i have the request to provide route alternatives:
let request: google.maps.DirectionsRequest = { origin: this.origin, destination: this.destination, travelMode: google.maps.TravelMode.TRANSIT, provideRouteAlternatives: true, transitOptions: { modes: transitMode, routingPreference: this.transitPreference }, }
this is followed with providing the dResultTransit as defined:
dResultTransit: Observable<google.maps.DirectionsResult | undefined> | undefined;
this.dResultTransit = this.DirectionsServiceTransit.route(this.TransitRequest()).pipe(map(response => response.result));
Reproduction
Steps to reproduce:
Expected Behavior
I expect 4 routes to be displayed as per below
Actual Behavior
however, this is only currently displaying 1 route.
Environment