rungwiroon / BlazorGoogleMaps

Blazor interop for GoogleMap library
MIT License
323 stars 104 forks source link

Add support for rendering multiple, interactive routes. #235

Closed Curlack closed 2 months ago

Curlack commented 1 year ago

I would like to have support for rendering all routes returned by DirectionsService.route method when DirectionsRequest.provideRouteAlternatives is true. This feature must not "interfere" with the current functionality. Would be nice to have the option to style PolyLine color (selected route vs non-selected route), but is just a nice-to-have. Blue and gray defaults would suffice. I should be able to select a non-selected (gray) route and trigger an OnRouteSelected event. I should be able to modify the selected (blue) route (DirectionsRendererOptions.Draggable = true) and trigger an OnRouteChanged event.

Futhermore, the DirectionsRenderer and DirectionsService objects, should be decoupled and the DirectionsResponse object should not have to "travel" from C# to Javascript. Should be an IJsObjectRef that only requires the Guid to "travel" e,g, GoogleMapsComponents.Maps.Map.

jacksonsfaria commented 6 months ago

I do this in my project. add routes I change them. and so on. I don't change the color of them. But if you want some help, I do it on a Blazor App.