perliedman/leaflet-routing-machine

Set waypoint name to an empty string on drag.

Opened this issue · 3 comments

Hi there!
is there any reason to update the waypoint name to an empty string, when end drag the point on the map?

this._waypoints[i].name = '';

Is that an expected behavior?
Thank you!

Sorry for getting back to you this late @vnmedeiros
I agree with the use case in the PR you linked. I'm thinking how we could integrate both approaches so it's up to the user to either clear or keep the waypoint name. Maybe some kind of setting would be ideal?

I'll try to spin something up in the coming days or on the weekend when I find some time

I added a new option to clear the waypoint name on drag.

Will be available in the next major release. If you need this to be backported to version 3 of this plugin, please let me know