Hi.
When setOrigin or setDestination are called 2 or more times input boxes stay opened, suggesting to select a location. I would like to behave as if it was initially set.
Example is here:
https://jsfiddle.net/etfg3d46/2/
Screenshot:
map.on('load', function() {
map.addControl(directionsControl, 'top-left');
directionsControl.setDestination("Philadelphia");
directionsControl.setOrigin("New York");
setTimeout(() => {
directionsControl.setDestination("Chicago, Illinois, United States");
}, 2500);
setTimeout(() => {
directionsControl.setOrigin("Washington");
}, 5000);
});
It doesn't happen when I pass coordinates, but I would like to see place names instead of numbers in input boxes.
Any workarounds to keep it closed?