Skip to content

Add Map VisualNode for geographical coordinate visualization#451

Draft
Copilot wants to merge 5 commits intomainfrom
copilot/create-node-map-visualization-again
Draft

Add Map VisualNode for geographical coordinate visualization#451
Copilot wants to merge 5 commits intomainfrom
copilot/create-node-map-visualization-again

Conversation

Copy link

Copilot AI commented Feb 12, 2026

Implements a VisualNode for rendering latitude/longitude data with interactive zoom and pan controls. Designed for real-time AIS vessel tracking via WebSocket but accepts any JSON with coordinate data.

Implementation

Core Node (node/VisualNode/node_map.py)

  • Recursive coordinate extraction from arbitrary JSON structures (supports latitude/longitude, lat/lon, lat/lng, nested objects, arrays)
  • Auto-fit bounding box calculation with 10% padding, clamped to valid coordinate ranges
  • matplotlib-based rendering with zoom (0.5x-10x) and 2-axis pan controls (-1.0 to 1.0)
  • Follows existing VisualNode patterns (similar to Heatmap, ObjChart)

Coordinate Extraction

# Handles multiple formats
{"boats": [{"latitude": 40.7, "longitude": -74.0}]}  # AIS format
{"lat": 40.7, "lon": -74.0}                          # Simple format
[{"latitude": 40.7, "longitude": -74.0}, ...]        # Array format

View Controls

  • Initial view auto-fits all points with padding
  • Zoom modifies viewport size around center
  • Pan translates viewport within original bounds
  • Controls preserve ability to return to initial auto-fit view (reset to defaults)

Testing

  • 8 unit tests covering coordinate extraction, bounds calculation, rendering pipeline
  • Example script generates 7 different map scenarios
  • No new dependencies (uses existing matplotlib stack)

Files

  • node/VisualNode/node_map.py - Node implementation (543 lines)
  • tests/test_map_node.py - Test suite
  • node/VisualNode/README_Map.md - Documentation
  • examples/example_map_node.py - Usage examples

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 4 commits February 12, 2026 20:43
Co-authored-by: hackolite <826027+hackolite@users.noreply.github.com>
Co-authored-by: hackolite <826027+hackolite@users.noreply.github.com>
Co-authored-by: hackolite <826027+hackolite@users.noreply.github.com>
Co-authored-by: hackolite <826027+hackolite@users.noreply.github.com>
Copilot AI changed the title [WIP] Create node map visualization from JSON data Add Map VisualNode for geographical coordinate visualization Feb 12, 2026
Copilot AI requested a review from hackolite February 12, 2026 20:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants