mapbox-gl-directions
mapbox-gl-directions copied to clipboard
removeRoutes removes instructions completely if same destination
When calling removeRoutes, mapbox removes the instructions overlay like expected. However, if you do another route to the same lon,lat, the instructions never reveals (refresh needed)
I have the same issue. I'm trying to toggle the directions on and off on map.
To turn off:
mapboxDirections.removeRoutes();
To turn on:
mapboxDirections
.setOrigin(origin)
.setDestination(destination);
But turn by turn instructions box won't reappear. Any idea how to fix this?