Small route planning application

Maybe the arrow could become a smaller scissor when indicating the spot on the stage?

The “link cursor” (a hand with a pointing finger) is the Leaflet standard for indicating that an object is clickable and will trigger an action. I think it’s better to stick to this standard to indicate that the stage is clickable and will trigger a split.

I find the green and red circles not that clear, especially when multiple convoluted stages are in view. Maybe the start icon could be, say, a triangle arrow showing the direction?

Circle markers are natively supported by Leaflet (L.circleMarker) while triangle or rectangle markers are not. However, using triangle or rectangle markers for the start and end point should be feasable with some custom code. Let me some time to think about it…

I couldn’t figure out how exactly it works, i.e. which end of which stage gets attached to another one, and whether or not I should reverse a stage first.

This is how the “Merge with another stage” function works:

  • The function first searches for the stages which end point is less than 2 km from the start point of the current stage. These are candidates for merging before the current stage and colored in green.
  • Then it searches for the stages which start point is less than 2 km from the end point of the current stage. Those are candidates for merging after the current stage and colored in red.
    (The stages which start and end points are further are not eligible for merging and are left unchanged.)
  • Then the user is requested to select the stage he wants to merge with the current stage (among the stages colored in green or red).
  • If he selects a stage colored in green, it is merged before the current track.
  • If he selects a stage colored in red, it is merged after the current track.
  • If needed, a small path is inserted between the two points where the two stages are linked (between the end point of the selected stage and the start point of the current stage, or between the end point of the current stage and the start point of the selected stage).
  • When the merge is done, the two stages are replaced by one single stage.

The crow setting kept disappearing so the join would route when I wanted to do a straight line join

Strange… Functions such as Split, Merge, Import and Set name freeze the other functions until they are complete. Maybe you tried to select “crow” while merging was already started… You must select it before clicking the Merge button.

I desperately wanted an undo/stepback function (Control-Z)

I am aware of this shortcoming and intend to fix it soon. That will be my next step.

Thank you for testing my application and helping me improve it!

I probably confused myself with the crow mode.

I didn’t get the red and green candidate status and the two Km range. I tested everything within a 4 Km2 range, so all points of the candidates were within 2 Km of both end points of the active stage.

Further, there is a reverse function now, which I could use to reverse one of the tracks to join, to make sure the result will have the correct direction and that the join is between the right start/end points. But I could not see what the result would be, which points were about to be joined, so I couldn’t correct the directions before joining. If it wasn’t what I expected, I had to start afresh with new imports. (That’s probably where the crow mode was reset).

I completed and uploaded a new version with full support or Undo/Redo (through buttons or Ctrl+z/Ctrl+y).

1 Like

Almost final version. The stage profile can now be displayed as a line chart.

New version with additional functionalities available online at: GPX Route Planner
The stages are now ordered and their order can be managed.
Data are also provided for the whole route and its elevation profile can be displayed as a graph.
Buttons to focus the map on a stage or on the whole route have also been added.

2 Likes

A new version has just been set online:

  • All the menus can be hidden in order to work with the mouse and keyboard shortcuts only.
  • Part of the options have been removed of the main menu and set in a settings panel (which can be opened using the triple bars symbol left of the page title).
  • The options selected by the user are saved in cookies and retrieved when the user starts a new session.
  • The language set in the browser is taken into account.
  • New map styles and travel modes are offered.