mirror of
https://github.com/Kpa-clawbot/meshcore-analyzer.git
synced 2026-05-12 00:54:42 +00:00
f2689123f3
## Summary - Fixes #912 — geofilter-builder generates out-of-range longitudes for southern hemisphere locations - Root cause: Leaflet's `latlng.lng` is unbounded; panning from Europe to Australia produces values like `-210` instead of `150` - Fix: call `latlng.wrap()` in `latLonPair()` to normalise longitude to `[-180, 180]` before writing the config JSON ## Details When the user opens the builder (default view: Europe, `[50.5, 4.4]`) and pans east to Australia, Leaflet tracks the cumulative pan offset and returns `lng = 150 - 360 = -210` to keep the path continuous. The builder was passing that raw value straight into the output JSON, producing coordinates that fall outside any valid bounding box. `L.LatLng.wrap()` is Leaflet's built-in normalisation method — collapses any longitude to `[-180, 180]` with no loss of precision. ## Test plan - [x] Open the builder, navigate to NSW Australia, place a polygon — confirm longitudes are `~141`–`154`, not `~-219`–`-206` - [x] Repeat for a northern hemisphere location (e.g. Belgium) — confirm output is unchanged - [x] Paste the generated config into CoreScope — confirm nodes appear on Maps and Live view 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> Co-authored-by: Kpa-clawbot <kpaclawbot@outlook.com>