From 1a52bf4baf316baf41c65de77bde987d1dc1d40d Mon Sep 17 00:00:00 2001 From: Graham McIntire Date: Thu, 10 Jul 2025 17:54:35 -0500 Subject: [PATCH] geolocation tweak --- lib/aprsme_web/live/map_live/index.ex | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/aprsme_web/live/map_live/index.ex b/lib/aprsme_web/live/map_live/index.ex index 7beb19e..5b6b7f7 100644 --- a/lib/aprsme_web/live/map_live/index.ex +++ b/lib/aprsme_web/live/map_live/index.ex @@ -91,7 +91,7 @@ defmodule AprsmeWeb.MapLive.Index do # Check for IP geolocation in session Logger.info("MapLive: Checking IP geolocation. Session data: #{inspect(session["ip_geolocation"])}") Logger.info("MapLive: URL params: #{inspect(params)}") - + {map_center, map_zoom} = case session["ip_geolocation"] do %{"lat" => lat, "lng" => lng} when is_number(lat) and is_number(lng) -> @@ -109,7 +109,10 @@ defmodule AprsmeWeb.MapLive.Index do _ -> # No geolocation available, use URL params or defaults - Logger.info("MapLive: No IP geolocation found, using URL/default center: #{inspect(url_center)}, zoom: #{url_zoom}") + Logger.info( + "MapLive: No IP geolocation found, using URL/default center: #{inspect(url_center)}, zoom: #{url_zoom}" + ) + {url_center, url_zoom} end