Open Wikinaut opened 2 years ago
Hey, just another fan of this tool here. Color coding from source code:
const durationCategoryColour = c => {
if (c === -1) return '#999' // unknown duration
if (c === 0) return '#333' // 0
if (c === 1) return '#191' // < 1h
if (c === 2) return '#2d1' // 1h-2h
if (c === 3) return '#d4d411' // 2h-4h
if (c === 4) return '#d91' // 4h-8h
if (c === 5) return '#d41' // 8h-16h
if (c === 6) return '#a41' // > 16h
return '#999'
}
Does it make sense to show a hint on the map in case this gets asked more often? Had the same question
Thanks for suggesting this! I'd be happy to have this feature, but AFAIK there are - quite bafflingly - no responsive out-of-the-box libraries for mapbox-gl that one could use here, and I currently don't have too much time to build a legend on my own, even though the task shouldn't take too long. Will look into that in the future, however, and if someone else wants to do so before, I'd also be grateful 🙂
I think that a "help" or "explanations" or "legend" link in the footer would be just enough, no need for a fancy solution.
Looks, as if the colours denote the travel duration in one-hour steps?