diff --git a/lib/microwaveprop_web/live/weather_map_live.ex b/lib/microwaveprop_web/live/weather_map_live.ex index 09084b28..671a90eb 100644 --- a/lib/microwaveprop_web/live/weather_map_live.ex +++ b/lib/microwaveprop_web/live/weather_map_live.ex @@ -6,6 +6,8 @@ defmodule MicrowavepropWeb.WeatherMapLive do alias Microwaveprop.Weather.MapLayers alias MicrowavepropWeb.WeatherMapComponent + require Logger + @layers MapLayers.all() @default_layer MapLayers.default_id() @@ -41,9 +43,14 @@ defmodule MicrowavepropWeb.WeatherMapLive do # the LiveView socket join timeout. The client now paints weather # through a tile endpoint, so mount only needs the selected layer # and valid_time metadata. - valid_times = recent_valid_times(Weather.available_weather_valid_times()) + all_vts = Weather.available_weather_valid_times() + valid_times = recent_valid_times(all_vts) initial_vt = pick_initial_valid_time(valid_times) + Logger.info( + "WeatherMapLive.mount: all_vts=#{length(all_vts)} recent_vts=#{length(valid_times)} initial_vt=#{inspect(initial_vt)}" + ) + {lat, lon, zoom} = parse_viewport_params(params) {:ok,