From jsprit to leaflet map

Hi,

can I display routes given by Jsprit as a result using leaflet ?? how can I do it ! ? help plz

This is a multi-stage process. You calculate the distance matrix with GraphHopper; feed this into jsprit; get back the reordered locations (per vehicle) and calculate the final routes with GraphHopper that can be displayed with our JS client on any map including one that use leaflet.

plz I am not so familiar with graphHopper …can I avoid all this
multi-stage process by this :

if Leaflet supports loading xml data and jsprit give us the result in xml
format. so can I do it so .isn’t easier ?
if it is not feasible tell me ! because I am not sure . I wanna just do it
fast. thxs a lot for your help

Jsprit uses distance beetwen 2 or more points.
To calculate the distance beetween 2 map points u need to use something like graphHopper or google to calculate the distanceMatrix beetween those points and then put it in a CostMatrix.
Then u can do the vrp and then give the xml/Json to Leaflet.
If u do a Jsprit problem without Google/GH distanceMatrix ur just calculating something plain that cannot fit in a map.

Hi ,

thxs a lot for your quick answers … I finally understand what should I do
to reach my goal . but is this use is free,? or should I pay while using
GraphHooper MatrixApi ??

i’ve got no clue 'bout gh matrixApi. google one is free for 2500 elements/day

I Am really thankful cause u answer all my questions even those seeming
easy.
I think this will be my last question : i Am already Reading jsprit code
but i still dont know where Can i use the API result in it…in other words
how Can i feed the result to jsprit !?