Remove grid squares toggle from rover planner page

The rover page now shows only: station markers, band selector,
propagation heatmap, and URL sharing. Grid overlay remains on
the main /map page.
This commit is contained in:
Graham McIntire 2026-04-10 17:31:18 -05:00
parent 1d76497db5
commit ac36441102
2 changed files with 1 additions and 41 deletions

View file

@ -1,13 +1,9 @@
import { updateGridOverlay } from "./maidenhead_grid"
export const RoverMap = {
mounted() {
this.stations = []
this.stationMarkers = L.layerGroup()
this.scoreOverlay = null
this.gridLookup = new Map()
this.gridLayer = L.layerGroup()
this.gridVisible = true
this.colorScale = [
{ min: 80, r: 0, g: 255, b: 163 },
@ -30,8 +26,6 @@ export const RoverMap = {
this.map = map
this.stationMarkers.addTo(map)
this.gridLayer.addTo(map)
updateGridOverlay(map, this.gridLayer)
// Render pre-loaded propagation scores
const initialScores = JSON.parse(this.el.dataset.scores || "[]")
@ -50,9 +44,6 @@ export const RoverMap = {
map.on("moveend", () => {
pushBounds()
if (this.gridVisible) {
updateGridOverlay(map, this.gridLayer)
}
})
this.handleEvent("update_scores", ({ scores }) => {
@ -64,15 +55,6 @@ export const RoverMap = {
this.renderStations()
})
this.handleEvent("toggle_grid", ({ visible }) => {
this.gridVisible = visible
if (visible) {
this.gridLayer.addTo(map)
updateGridOverlay(map, this.gridLayer)
} else {
this.gridLayer.remove()
}
})
},
// --- Propagation score overlay (same as main map) ---

View file

@ -38,8 +38,7 @@ defmodule MicrowavepropWeb.RoverLive do
resolving: false,
url_loaded: false,
initial_scores_json: Jason.encode!(initial_scores),
bounds: @initial_bounds,
grid_visible: true
bounds: @initial_bounds
)}
end
@ -99,17 +98,6 @@ defmodule MicrowavepropWeb.RoverLive do
{:noreply, push_url(socket)}
end
def handle_event("toggle_grid", _params, socket) do
visible = !socket.assigns.grid_visible
socket =
socket
|> assign(:grid_visible, visible)
|> push_event("toggle_grid", %{visible: visible})
{:noreply, socket}
end
def handle_event("map_bounds", bounds, socket) do
scores = Propagation.latest_scores(socket.assigns.band, bounds)
@ -224,16 +212,6 @@ defmodule MicrowavepropWeb.RoverLive do
<% end %>
</select>
<label class="flex items-center gap-2 cursor-pointer px-1">
<input
type="checkbox"
class="toggle toggle-sm toggle-primary"
checked={@grid_visible}
phx-click="toggle_grid"
/>
<span class="text-sm">Grid squares</span>
</label>
<form phx-submit="add_station" class="flex gap-1">
<input
type="text"