X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/23ffdadb565be5ccc4ae9fad9647bdf0fa9b8683..9126653ffd07e38800986a6410ae1fe0955989fc:/app/assets/javascripts/routing_engines/graphhopper.js diff --git a/app/assets/javascripts/routing_engines/graphhopper.js b/app/assets/javascripts/routing_engines/graphhopper.js index 6d83e26e2..0f29c162b 100644 --- a/app/assets/javascripts/routing_engines/graphhopper.js +++ b/app/assets/javascripts/routing_engines/graphhopper.js @@ -1,6 +1,7 @@ GraphHopperEngine = function(vehicleName, vehicleParam, locale) { this.vehicleName = vehicleName; this.vehicleParam = vehicleParam; + //At this point the local system isn't correctly initialised yet, so we don't have accurate information about current locale this.locale = locale; if (!locale) this.locale = "en"; @@ -10,12 +11,13 @@ GraphHopperEngine.prototype.createConfig = function() { var that = this; return { name: "javascripts.directions.engines.graphhopper_"+this.vehicleName.toLowerCase(), + creditline: 'Graphhopper', draggable: false, _hints: {}, getRoute: function(isFinal, points) { var url = "http://graphhopper.com/routing/api/route?" + that.vehicleParam - + "&locale=" + that.locale; + + "&locale=" + I18n.currentLocale(); for (var i = 0; i < points.length; i++) { var pair = points[i].join(','); url += "&point=" + pair;