leaflet-routing-machine
leaflet-routing-machine copied to clipboard
Fix about name of waypoints
Ensure assign name of waypoint with empty string only if the original name has no value.
After dragging the waypoint, the name should be cleared since it is no longer the same location. It's confusing if the old address is displayed even after dragging the waypoint.
Can you explain why you need this change?
Sure, in some cases of use, it's necessary to use the name of waypoint instead of the address. For example, I name some waypoints with custom names (home, work ...), and when I drag these points I lost the name. I understand if the library prefers not to accept this change, I'm just sharing a different use case.