Search code examples
leafletgraphhopperleaflet-routing-machine

Graphhopper disable instructions


I'm using Leaflet Routing Machine libraries for routes in my project and a Graphhopper server. When inspecting network in my browser the library always gets a response from the graphhopper server with a parameter "instructions" as true but i don't use instructions in my project, how can i disable it ?


Solution

  • i found out a solution, in my code; in the options of the L.Routing.Control object i added :

    router: L.Routing.graphHopper('', {
             urlParameters : {
                 instructions : false
         }
    })
    

    and it's working fine