Closed MinhxNguyen7 closed 1 year ago
I recently took a look at this component and simplified it as best as I could. I think was able to reproduce most of the behaviors I can discern...bar specifically this one.
Here's my implementation: https://github.com/icssc/AntAlmanac/blob/aponia/src/components/Map/Routes.tsx
The main blocker I ran into was the routeLine
option when configuring the router
(it automatically fetches the data and draws lines to the map), and somehow getting the rendered route lines to do something on hover or interaction
Closing as I think I've been able implement this sufficiently: https://github.com/icssc/AntAlmanac/blob/aponia/src/components/Map/Routes.tsx
Reopening until this change makes it onto the live site.
Currently, it is very difficult to hover over a route in such a way that the popup (displaying distance and duration) shows up. I think it's quite a helpful feature that should be easier to make use of.
Making the margins for error larger for the hover would probably be good. Also, we should consider letting users click on the route to display the popup to make it usable on touchscreen devices,