Open samanpwbb opened 10 years ago
In addition, the empty sidebar in default state is weird/confusing:
@jfirebaugh do you know off hand what changed that would haves caused these issues? Looking at the history quick I don't spot any obvious culprit. I can look into this when I get a chance.
The mapbox.js example doesn't contain all the code from the original mapbox-directions.js example. In particular the code that adds an .active
class to the sidebar and the CSS to show/hide it.
I would do one of two things here to make this example better:
It's got one foot in both options right now in an awkward way.
@samanpwbb what's less effort? The current situation does not represent our directions API well.
@DennisOSRM if you want a better demo, https://www.mapbox.com/mapbox-directions.js/?route=-122.4874,37.7867;-122.4464,37.7720#13/-122.4601/37.7736 is up and running.
Clearing start or beginning values from directions examples removes geometries from the map but doesn't clear the directions sidebar. This leaves user is a weird state where they can interact with the sidebar, see a marker on the map hover, but without a visible route.
This feels wrong. I would clear the sidebar when one of the values gets cleared.