Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a way to remove the Marker from Routes in Leaflet-Routing-Machine?

I am using the Leaflet-Routing-Machne for creating a Route between two existing markers, when one clicks them. The problem is, it always adds a marker to the star/end points.

However I want it to be adding no markers. Is there a way for that?

like image 322
Saggex Avatar asked Jul 14 '15 10:07

Saggex


1 Answers

Probably you are looking for this:

L.Routing.control({ createMarker: function() { return null; } });

Reference: https://github.com/perliedman/leaflet-routing-machine/issues/104

like image 117
abraham poorazizi Avatar answered Oct 12 '22 15:10

abraham poorazizi