Implement Map Creation Mode and Data Export#5
Conversation
- Remove deprecated middle-click measurement tool. - Add "Creation Mode" toggle in Settings. - Implement node and edge creation logic: - Middle-click for buildings (with label and address prompts). - Shift + Right-click for intersections (with road and lane prompts). - Ctrl + Right-click to connect existing nodes with edges (with speed prompt). - Save creation data to localStorage as `creation-mapping.json`. - Add "Open Creation Data" button to view and copy the collected JSON. - Add modals for data entry and JSON viewing. - Ensure Developer Mode and Creation Mode are mutually exclusive visually. Co-authored-by: austinkden <167563184+austinkden@users.noreply.github.com>
|
👋 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 New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
|
@jules ADD: |
|
@jules Also add an "Import Creation Data" button below the "Open Creation Data" button that will allow the user to upload a creation JSON file. Also add a "Delete Creation Data" button below the import button that will ask the user if they're sure they wanna delete all the creation data with a prompt, then it will delete all the data from local storage and the file |
|
@jules when you left click something to edit it, there should also be the option to delete that single building/intersection/edge |
I have implemented the ability to delete individual nodes and edges. When in Creation Mode, you can now click on an existing building, intersection, or road to open an 'Edit' modal, which now includes a 'Delete' button to remove that specific element. |
- Added 'Creation Mode' toggle in Settings with mutual exclusivity with Developer Mode. - Implemented node creation: Middle-click for buildings (POI), Shift+Right-click for intersections. - Implemented edge creation: Ctrl+Right-click on two nodes to connect them. - Added data management tools: 'Open Creation Data' (JSON export), 'Import Creation Data' (JSON upload), and 'Delete Creation Data' (bulk clear). - Implemented click-to-edit modals for existing nodes and edges, including individual deletion and referential integrity for ID changes. - Persisted data to localStorage under 'creation-mapping'. - Added speed limit tooltips for edges in Creation Mode. - Deprecated and removed the old middle-click measurement tool. Co-authored-by: austinkden <167563184+austinkden@users.noreply.github.com>
|
@jules Make sure all of the buttons on all of the menus are the same size for creation mode. some of the cancel buttons are much bigger than the save buttons. Also make sure that the X button in the top right of all the menus actually cancels as well, most of them dont work |
I have fixed the issues with the Creation Mode menus:
|
- Adjusted modal footer CSS to ensure all buttons are equal width. - Implemented event delegation for modal 'X' close buttons to fix reliability issues with Lucide icon replacement. - Ensured all close buttons correctly clear pending node state. Co-authored-by: austinkden <167563184+austinkden@users.noreply.github.com>
|
@jules make sure each intersection ID also includes the lane numbers in it. and the label should be "Road Name (Lane #) & Road Name (Lane #)". For example, Freedom Avenue EB (2) & Durham Road NB (1) is a proper label. And dont forget to add the lane numbers to intersection id too |
I have updated the intersection node logic as requested.
|
- Modified intersection label generation to: "Road Name (Lane #) & Road Name (Lane #)". - Updated ID generation to include lane counts and parentheses. - Improved edit modal parsing to handle new label format. Co-authored-by: austinkden <167563184+austinkden@users.noreply.github.com>
|
@jules all of the edges will be one way, as there will be a minimum of 4 nodes per intersection (for a basic intersection). whichever direction the edge is drawn in is the direction of the node, and the only direction allowed for that node. when an edge is hovered, display the speed limit and show an arrow on the edge displaying the one-way direction that the node has |
I've implemented the requested one-way edge functionality:
|
- Set all new edges to 'oneWay: true' by default. - Integrated Leaflet.PolylineDecorator for directional arrows. - Added mouseover/mouseout logic to show/hide the direction arrow on edges. - Maintained speed limit tooltip on hover. Co-authored-by: austinkden <167563184+austinkden@users.noreply.github.com>
This PR introduces "Creation Mode," a developer tool for gathering map data. It replaces the existing middle-click measurement tool with a more robust node and edge creation system. Users can now click on the map to add buildings and intersections, or connect existing nodes to form roads. All collected data is stored in
localStorageand can be exported as a JSON snippet through a new modal. Style updates ensure a consistent dark-theme look for the new UI components.PR created automatically by Jules for task 17780179518745687423 started by @austinkden