Skip to content

Overhaul Mapping and Routing System#3

Merged
austinkden merged 1 commit intomainfrom
overhaul-mapping-routing-system-6434123903747559881
Mar 8, 2026
Merged

Overhaul Mapping and Routing System#3
austinkden merged 1 commit intomainfrom
overhaul-mapping-routing-system-6434123903747559881

Conversation

@austinkden
Copy link
Contributor

This submission overhauls the core mapping and routing infrastructure of the application.

Key changes include:

  1. Data Model (mapping.json): Transitioned to a structured node system (intersections vs. waypoints) and added rich edge data for geometry and directionality.
  2. Pathfinding (script.js): Enhanced the Dijkstra implementation to handle one-way systems, crucial for the newly modeled highways and ramps.
  3. Rendering: The map now accurately reflects road curves by drawing polylines through intermediate waypoints. The system intelligently reverses waypoint sequences when traversing undirected edges in reverse.
  4. Navigation: Turn-by-turn directions are now more concise, focusing on real intersections and filtering out internal geometry points.

Verification was performed using automated JSON validation, Playwright E2E tests, and visual inspection of generated route screenshots confirming correct one-way flow and curved geometry.


PR created automatically by Jules for task 6434123903747559881 started by @austinkden

…fic flow

- Implement new JSON schema in mapping.json with node types (intersection, poi, waypoint) and edge attributes (oneWay, waypoints).
- Model Highway 55 as separate NB/SB lanes with one-way ramps.
- Update Dijkstra algorithm in script.js to respect oneWay directionality.
- Enhance polyline rendering to draw through edge waypoints, including sequence reversal for two-way roads.
- Refine directions engine to skip waypoint nodes and only trigger turn instructions at intersections with name changes.
- Fix duplicate node ID and logical inconsistencies in map data.

Co-authored-by: austinkden <167563184+austinkden@users.noreply.github.com>
@google-labs-jules
Copy link
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@austinkden
Copy link
Contributor Author

@jules Actually... tomorrow I'm going to manually add a lot of data. I will be adding several nodes per road (one for each lane) and several nodes per intersection (for each lane and direction)
Hopefully this will make it easier... please make sure all the code will work for this. Don't worry about clearing mapping.json - i'll handle that tomorrow

@google-labs-jules
Copy link
Contributor

@jules Actually... tomorrow I'm going to manually add a lot of data. I will be adding several nodes per road (one for each lane) and several nodes per intersection (for each lane and direction)
Hopefully this will make it easier... please make sure all the code will work for this. Don't worry about clearing mapping.json - i'll handle that tomorrow

@jules Acknowledged. I have updated the routing logic in script.js to be more robust for high-density data. Specifically:

  1. POIs (buildings) can now dynamically connect to any non-POI nodes (like lane-specific nodes or waypoints), ensuring they find the nearest entry/exit point regardless of whether it's a major intersection.
  2. The directions engine has been refined to correctly handle paths that might start with several waypoint segments, ensuring the 'Head towards' instruction identifies the first relevant landmark.

The code is ready for the new data!

@austinkden austinkden merged commit 27bc330 into main Mar 8, 2026
3 checks passed
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.

1 participant