perliedman/leaflet-routing-machine

Changing route color when click on marker

BenLaKnet opened this issue · 2 comments

Hi,

I want to change route color when I click on Start or End marker, how is it possible ?
https://www.lamaraudiere.com/d4ua/cartographie.php

You should be able to use the routeLine option on L.Routing.Control to customize the line appearance depending on which line is currently selected. Technically, clicking a marker should trigger a route event in your example since it displays the itinerary and would also redraw the routes

Hi @curtisy1 ,

I found this link too : https://stackoverflow.com/questions/53963285/routing-control-name-and-add-custom-markers, and that helps me to change route line color.

Many thanks