mapbox-gl-directions icon indicating copy to clipboard operation
mapbox-gl-directions copied to clipboard

removeRoutes removes instructions completely if same destination

Open kamerat opened this issue 7 years ago • 1 comments

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)

kamerat avatar Mar 21 '17 23:03 kamerat

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?

sam9191 avatar May 18 '18 04:05 sam9191