OpenWaterFoundation / owf-app-infomapper-ng

Open Water Foundation InfoMapper web application for menu-driven maps and visualizations, using Angular
GNU General Public License v3.0
1 stars 2 forks source link

Add indicator in legend when there is a data issue #253

Closed smalers closed 4 years ago

smalers commented 4 years ago

Now that we are starting to use web services for data layers, there is more potential that a layer is not available due to various reasons. In these cases hopefully an error code is being generated that can be handled. Rather than not showing the layer on the map or having the app crap out, I recommend the following:

  1. Show the layer in the legend. Obviously if the problem is severe enough to not be able to do this then don't show.
  2. If there is an error, need some kind of indicator, maybe where the legend would normally be rendered? It could be an icon, words or both but the message would be something to the effect of "Data unavailable" or maybe "Data unavailable - try refreshing the page later".
  3. When the auto-refresh functionality is enabled, it might say "Data unavailable - retrying at HH:MM:SS".
  4. If auto-refresh, must be able to clear the warning in the legend and draw the legend normally.
smalers commented 4 years ago

Is it also possible to indicate in the legend when a data layer is still loading? For example the US wildfires map takes a few seconds for the layer to load and if uncomfortable to the user they may reload the page or do something else that makes the situation worse. On the other hand, we don't want spinners on the main map all the time. Is it possible to show a spinner or "horizontal back and forth" indicator to show that a layer is in the process of loading? If an error results, then an error indicator could be shown.

Nightsphere commented 4 years ago

The first push for this has been completed. If a property path is incorrect, or a server is currently unavailable, a red triangular warning sign will appear. Still a work in progress.

smalers commented 4 years ago

Is this done. I think I tried specifying a bad geojson path and it showed a triangle. See if this can be tested and close.

Nightsphere commented 4 years ago

I tested as well and it was looking okay. Any other problems found later can be opened as their own issues. Closing this issue.