Closed gregallensworth closed 6 years ago
About 1 time in 4 on this PC, changing the date results in an endless loop of the map and the URL bar chasing each other back and forth, waffling between two dates.
To replicate, just try to pick a new date. Try it a few times. It will happen eventually, though it never did this in my earlier testing...
I expect that this comes from both the date filter control and the URL hash both trying to be the source of truth as to the map's date view.
applyUrlHashToMap()
does the date filtering in a setTimeout
so as to work around bugs in Mapbox GL API (it fires load
before the map is fiully loaded).
Per chat today, the datefilter map's timeslider could use some improvements:
[x] Apply filter only when Apply button is clicked; current
change
handler updates too aggressively, and "feels clunky" when one is updating the dates, e.g. in the middle of entering new dates one enters a range of "2008-01-01 to 2000-01-01" momentarily.[x] Existing calendar widget allows one to select a year, but that's not obvious: one must mouse over the year to discover this. Can this behavior always be in place so folks can find it?
[x] Add UI below the date boxes, to go forward or backward 1 year and forward or backward 10 years. This would adjust both dates, "shifting the window" with one click.