asascience / ott-coops

Project Tracking for OTT Co-Ops
1 stars 0 forks source link

Add the Tooltip Hover Tool to OTT and MARACOOS Instances #417

Closed jamesdoyle21 closed 2 years ago

jamesdoyle21 commented 2 years ago

Bring the tool that FloodMap has into the other instances

kvmartin001 commented 2 years ago

@jamesdoyle21 One issue with this. The hover tool only looks for data at the current timestep. This is fine for Floodmap because each timestep is guaranteed to have data, but catalog layers have gaps.

For example, if you load up MARACOOS the default layer is AVHRR 7-day. The hover tool will look like it's doing nothing because it doesn't show a popup if no data comes back from the server.

I'll have to bring time into this somehow. This ties into https://github.com/asascience/oceansmap-3/issues/330 and https://github.com/asascience/oceansmap-3/issues/333

Any thoughts here @mpiannucci?

jamesdoyle21 commented 2 years ago

Well, if no data is available for a selected layer, we already give the user an error or warning message, right? So that may be enough to alert them that there will be no data appearing for the hover tool

kvmartin001 commented 2 years ago

Ah, wait the map tiles just show the most recent timestep. And I can use the same exact function in the tooltip, so the tooltip will always match the tiles. So the only question is what to do if there's a date warning on the layer - show the numbers in orange or just hide them.

kvmartin001 commented 2 years ago

The obs drawer doesn't actually warn you when this happens... not sure if that's right but my PR matches the obs drawer at least

image

jamesdoyle21 commented 2 years ago

I think making the text the same color as that warning would get the point across