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!