uchicago-capp-30320 / RouteRangers

Transit planning tool designed to retrieve end user input and also facilitate local transit authorities' decision making.
MIT License
1 stars 1 forks source link

Policy Maker Dashboard Maps: Tooltips for pins and routes #89

Open mbjackson-capp opened 6 months ago

mbjackson-capp commented 6 months ago

Tooltips for pins and routes: Upon hover-over and/or click-over, display name, ridership, route, etc.

This may require JavaScript sending data to and from the back-end upon user action -- I suspect that loading in this data for every possible point up-front will cause excessive load times

It will also require reading in every StationRouteRelation for each station that serves multiple lines, and iterating through all of them to list them all properly on a single tooltip (ideally with a little color square for color-coded lines)

mbjackson-capp commented 6 months ago

look into marker.bindPopup and marker.bindTooltip (consider e.g. mouse-over just showing name and line, then on click showing more of the data) https://stackoverflow.com/questions/55267558/show-leaflet-tooltip-on-hover-only-when-popup-is-not-being-shown

mbjackson-capp commented 6 months ago

Insofar as this is a general issue for "marker stuff", there is a plugin called AwesomeMarkers that enables custom coloration of markers: https://stackoverflow.com/questions/43613560/changing-marker-colour-based-on-property-in-leaflet