Feature: Traceroute - World Map / Visual Routing#3520
Open
BornToBeRoot wants to merge 5 commits into
Open
Conversation
Contributor
|
Tick the box to add this pull request to the merge queue (same as
|
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds an offline “visual traceroute” world map to the Traceroute tool, rendering hop geolocations and hop-to-hop direction arrows with pan/zoom support, and exposes an app setting for default expansion of the map panel.
Changes:
- Adds a new
TracerouteMapViewWPF control that draws an embedded vector world map with hop markers, arrows, and an info panel. - Updates
TracerouteViewlayout to host the map under the hop grid with an expander + row splitter, including persistence of the default expanded/collapsed state via settings. - Adds embedded map resources (cities/country outlines), a generation script, and attribution in the resource documentation list.
Reviewed changes
Copilot reviewed 16 out of 18 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| Source/NETworkManager/Views/TracerouteView.xaml.cs | Adds expander/collapse logic to preserve map row height and free space when collapsed. |
| Source/NETworkManager/Views/TracerouteView.xaml | Reworks layout to include a resizable, collapsible map panel under traceroute results. |
| Source/NETworkManager/Views/TracerouteSettingsView.xaml | Adds a UI toggle for the “Expand map view” setting. |
| Source/NETworkManager/Views/TracerouteMapView.xaml.cs | Implements the new map control: drawing, decluttering, zoom/pan, hop grouping, and hover info. |
| Source/NETworkManager/Views/TracerouteMapView.xaml | Defines the map control UI (canvas layers, info panel, reset button). |
| Source/NETworkManager/Views/TracerouteMapView.HANDOFF.md | Adds an implementation handoff note (review flagged as should not ship). |
| Source/NETworkManager/ViewModels/TracerouteViewModel.cs | Introduces ExpandMapView and loads it from settings. |
| Source/NETworkManager/ViewModels/TracerouteSettingsViewModel.cs | Persists ExpandMapView to settings from the settings UI. |
| Source/NETworkManager/Resources/Styles/GridSplitterStyles.xaml | Adds HorizontalGridSplitter style for row resizing. |
| Source/NETworkManager/Resources/Maps/world-cities.json | Adds embedded city reference data for the offline map. |
| Source/NETworkManager/NETworkManager.csproj | Embeds the map JSON files as resources in the main app assembly. |
| Source/NETworkManager.Settings/SettingsInfo.cs | Adds Traceroute_ExpandMapView setting property. |
| Source/NETworkManager.Settings/GlobalStaticConfiguration.cs | Adds default value for Traceroute_ExpandMapView. |
| Source/NETworkManager.Localization/Resources/Strings.resx | Adds localized keys for “Map”, “Expand map view”, and Natural Earth attribution. |
| Source/NETworkManager.Localization/Resources/Strings.Designer.cs | Adds strongly-typed accessors for the new localization keys. |
| Source/NETworkManager.Documentation/ResourceManager.cs | Adds Natural Earth GeoJSON source attribution entry. |
| Scripts/Create-WorldMapFromWeb.ps1 | Adds script to generate the embedded map/cities JSON from Natural Earth sources. |
Files not reviewed (1)
- Source/NETworkManager.Localization/Resources/Strings.Designer.cs: Generated file
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+376
to
+380
| if (groups.Count > 0 && IsSameLocation(groups[^1].Info, info)) | ||
| { | ||
| groups[^1].Hops.Add(hop); | ||
| continue; | ||
| } |
Comment on lines
+602
to
+603
| return string.Equals(a.City, b.City, StringComparison.OrdinalIgnoreCase) && | ||
| string.Equals(a.Country, b.Country, StringComparison.OrdinalIgnoreCase); |
Comment on lines
+404
to
+406
| var displayPoints = SpreadOverlappingPoints( | ||
| groups.Select(g => (g.Point, LocationKey: $"{g.Info.City}␟{g.Info.Country}".ToLowerInvariant())) | ||
| .ToList(), |
| var displayPoints = SpreadOverlappingPoints( | ||
| groups.Select(g => (g.Point, LocationKey: $"{g.Info.City}␟{g.Info.Country}".ToLowerInvariant())) | ||
| .ToList(), | ||
| 1 / _scale); |
Comment on lines
+697
to
+699
| var dx = to.Point.X - from.Point.X; | ||
| var dy = to.Point.Y - from.Point.Y; | ||
| var length = Math.Sqrt(dx * dx + dy * dy); |
Comment on lines
+1198
to
+1199
| if (!_isPanning || !IsExpanded) | ||
| return; |
|
|
||
| ::: | ||
|
|
||
| Hover a marker or arrow to show its details (location, ISP/ASN, hostname, IP address and average round-trip time) in the top-left info panel. |
|
|
||
| **Traceroute** | ||
|
|
||
| - New **Map** view below the hop list, visualizing each resolved hop's geolocation on an offline world map. Consecutive hops are connected with curved, directional arrows; hovering a marker or arrow shows its location, ISP/ASN, hostname, IP address and average round-trip time. The map supports mouse-wheel zoom and drag-to-pan, and can be collapsed via a toggle button on the map itself, similar to the Profiles panel. The map is only shown if **Check IP geolocation** and the new **Show map** setting are both enabled, since hops need a resolved geolocation to be plotted. [#3520](https://github.com/BornToBeRoot/NETworkManager/pull/3520) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes proposed in this pull request
Related issue(s)
To-Do
Contributing
By submitting this pull request, I confirm the following: