perliedman / leaflet-routing-machine

Control for routing in Leaflet
https://www.liedman.net/leaflet-routing-machine/
Other
1.06k stars 347 forks source link

Fix about name of waypoints #610

Open renanr0 opened 3 years ago

renanr0 commented 3 years ago

Ensure assign name of waypoint with empty string only if the original name has no value.

perliedman commented 3 years ago

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?

renanr0 commented 3 years ago

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.