From e0b89c2c19d2caa103a5e707bbfff58d249446ae Mon Sep 17 00:00:00 2001 From: Graham McIntire Date: Sat, 21 Jun 2025 21:24:31 -0500 Subject: [PATCH] handle geolocation error --- lib/aprs_web/live/map_live/index.ex | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/lib/aprs_web/live/map_live/index.ex b/lib/aprs_web/live/map_live/index.ex index 670462b..44549ae 100644 --- a/lib/aprs_web/live/map_live/index.ex +++ b/lib/aprs_web/live/map_live/index.ex @@ -260,6 +260,18 @@ defmodule AprsWeb.MapLive.Index do {:noreply, assign(socket, slideover_open: open)} end + @impl true + def handle_event("geolocation_error", %{"error" => _error}, socket) do + # Handle geolocation errors gracefully - just continue without geolocation + {:noreply, socket} + end + + @impl true + def handle_event("request_geolocation", _params, socket) do + # This event is handled by the JavaScript hook + {:noreply, socket} + end + @spec handle_bounds_update(map(), Socket.t()) :: {:noreply, Socket.t()} defp handle_bounds_update(bounds, socket) do # Update the map bounds from the client