Commit Graph

12 Commits

Author SHA1 Message Date
Daniel Pupius 3ca73ae978 NodeLocationMap: reduce default zoom by 1, add navigation controls
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-16 00:08:11 +00:00
Daniel Pupius a7eb73c558 Replace react-map-gl with direct maplibre-gl imperative API
react-map-gl's Source/Layer components were silently dropping layers
even after onLoad gating — likely a compatibility issue with
maplibre-gl v5. Switch all three map components to the imperative API
(new maplibregl.Map, map.on('load', ...), source.setData()) which is
the approach shown in MapLibre's own docs and has no wrapper layer.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-15 23:50:56 +00:00
Daniel Pupius 19a81a363e Gate map layers behind onLoad to fix missing markers
Source/Layer components mounted before the map style finishes loading
fail silently. Add mapLoaded state + onLoad callback to LocationMap,
NodeLocationMap, and NetworkMap so GeoJSON sources and layers are only
added after the style is ready.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-15 23:46:03 +00:00
Daniel Pupius 7e173c1b63 Fix NodeLocationMap height and always show center dot
- Pass fullHeight to NodeLocationMap in NodeDetail so it fills the
  h-[400px] wrapper rather than rendering its own h-[300px] and
  leaving dead space below
- Always show the center dot in NodeLocationMap: the previous threshold
  (accuracyMeters < 100) suppressed the dot for typical Meshtastic
  precision values (10-13 bits → 2-10km accuracy), making the map
  appear empty even when a location was known

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-15 23:43:03 +00:00
Daniel Pupius cb04054d18 Add compact attribution to NodeLocationMap and NetworkMap
Both were missing attributionControl so they rendered MapLibre's
default (full text). Now consistent with LocationMap.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-15 23:35:44 +00:00
Daniel Pupius 602a20cfc1 Fix several UI issues in packet stream and maps
- Fix __publicField runtime error from pre-compiled npm packages by
  defining the helper in vite optimizeDeps esbuildOptions
- Compact attribution control on LocationMap thumbnails so it doesn't
  dominate small maps
- Remove duplicate accuracy overlay in MapReportPacket (caption +
  accuracy div both at bottom-0 overlapping); accuracy still shown
  in the KeyValuePair section below
- Fix NodeLocationMap height: min-h-[300px] doesn't give ReactMap a
  resolved height, changed to h-[300px]
- Add short name lookup to TraceroutePacket hops (same pattern as
  NeighborInfoPacket)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-15 20:37:50 +00:00
Daniel Pupius d95a74c1d7 refactor(web): replace Google Maps with MapLibre, clean up map components
- Migrate all three map components (Map, GoogleMap, NetworkMap) to MapLibre GL JS
- Extract shared CARTO_DARK_STYLE constants into lib/mapStyle.ts
- Move buildCircleCoords to lib/mapUtils.ts (was duplicated across components)
- Rename exports: Map → LocationMap, GoogleMap → NodeLocationMap
- Remove dead props (width, height, nightMode) from LocationMap interface
- Lazy-mount GL contexts via IntersectionObserver to prevent WebGL exhaustion
- Fix Math.spread RangeError in NetworkMap bounds calculation
- Remove showLinks conditional render in favour of visibility layout property
- Remove cursor state; set canvas cursor style directly on map interactions
- Remove Google Maps API key env vars from .env.example and .env.local
- Move Vite dev server to port 5747 (avoids cached redirect on 3000)
- Fix CORS/404: set VITE_API_BASE_URL="" so browser uses Vite proxy

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-15 20:22:12 +00:00
Daniel Pupius 1c7bfcd330 Another try at fixing proto in CI 2025-05-02 12:32:09 -07:00
Daniel Pupius a88e55d22e Full-screen network map 2025-04-30 12:30:35 -07:00
Daniel Pupius c029ca1f7a Fix errors relating to lazy loading of map 2025-04-30 12:14:23 -07:00
Daniel Pupius 95800b33c7 Lazy load maps 2025-04-30 10:50:46 -07:00
Daniel Pupius 6c891a1b88 Break up NodeDetail into sub components 2025-04-25 17:56:25 -07:00