perliedman / lrm-graphhopper

Support for GraphHopper in Leaflet Routing Machine
ISC License
31 stars 52 forks source link

Add support to Vehicle and Locale options #3

Closed luizfonseca closed 9 years ago

luizfonseca commented 9 years ago

Now you can specify which vehicle and locale you want directly on the Graphhopper options object:

 L.Routing.Graphhopper('api-key', { vehicle: 'bike', locale: 'pt_PT' })
perliedman commented 9 years ago

Thanks! Sorry for taking so long to look at this.

I merged your changes in 440a95ac60f8ad467ccc02bd62c532f09c25893c, but also extended it a bit.

Instead of adding specific options for vehicle and locale, I added an option called urlParameters: this option can contain any parameters you want to add to the request URL, like vehicle and locale, you can also override what parameters lrm-graphhopper sets this way.

Thanks again, since I don't use this plugin in production myself, contributions like these are really valuable to see what's needed for real-world use!

luizfonseca commented 9 years ago

Perfect! :+1: