From f8193f73545ffa8006fa04f625d8f9b4b27f9a67 Mon Sep 17 00:00:00 2001 From: Eli Ribble Date: Sat, 14 Mar 2026 16:55:40 +0000 Subject: [PATCH] Default map to continental US Because 0,0 is in the middle of the ocean --- html/static/js/map-multipoint.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/html/static/js/map-multipoint.js b/html/static/js/map-multipoint.js index fd4ae6ff..2fea9bad 100644 --- a/html/static/js/map-multipoint.js +++ b/html/static/js/map-multipoint.js @@ -37,10 +37,16 @@ class MapMultipoint extends HTMLElement { const ymin = parseFloat(this.getAttribute("ymin")); const xmax = parseFloat(this.getAttribute("xmax")); const ymax = parseFloat(this.getAttribute("ymax")); - const bounds = [ + let bounds = [ [xmin, ymin], [xmax, ymax], ]; + if (xmin == 0 || xmax == 0 || ymin == 0 || ymax == 0) { + bounds = [ + [-125, 25], + [-70, 50], + ]; + } const mapElement = this.shadowRoot.querySelector("#map"); this._map = new maplibregl.Map({