Task: the user needs to select point A and B in order to build a route. But at the same time, to add a transit point, so that you can flexibly change the middle of the route. Now I have a code similar to the example from the documentation that uses control.RoutePanel.
And I would like the transit point to appear after constructing the route, as in this example from the documentation .
I tried to add code like this, but it doesn't work:
this.routePanelControl.routePanel .getRouteAsync() .then(function(multiRoute) { multiRoute.events.add("update", function() { multiRoute.options.set({viaIndexes: [2]}) } }); It seems that I can not add this point after the route has already been built without it.
Thank you in advance!