You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I am currently working on a university project where we are creating an application that includes routing as one of its features. I was wondering if it is possible to access the array of coordinates inside the selected route and then selectively change them?
Any help would be much appreciated, thank you.
The text was updated successfully, but these errors were encountered:
That's an excellent question and I don't think it's currently possible with the built-in functionality of LRM.
However, as @peter1599 said, _selectedRoute should work, in theory, as long as you set it again after (since Leaflet doesn't support on the fly updates, so we need to trigger an update internally).
This is done by the _updateLine function, which in turn gets called when either a route is selected, or alternatives are set.
As such, you can update the route by retriggering the _routeSelected or setAlternative functions.
For a working example, see this fiddle (note, you need to press the button in the bottom left corner twice for it to work)
Hi,
I am currently working on a university project where we are creating an application that includes routing as one of its features. I was wondering if it is possible to access the array of coordinates inside the selected route and then selectively change them?
Any help would be much appreciated, thank you.
The text was updated successfully, but these errors were encountered: