added switching between search engines
- works with different languages - works with links refactored selector code: - changed method names - changed method parameters (object -> id), - added method to rename all options of dropdown menu refactored distance format selector code: - changed method names - changed variable names - changed how to init/select element/change language of dropdown menu refactored maintenance notification overrides: - changed names of default variables
This commit is contained in:
@@ -66,6 +66,10 @@ OSRM.Localization["de"] = {
|
||||
// printing
|
||||
"OVERVIEW_MAP": "Übersichtskarte",
|
||||
"NO_ROUTE_SELECTED": "Keine Route ausgewählt",
|
||||
//routing engines
|
||||
"ENGINE_0": "Auto (schnellste Strecke)",
|
||||
"ENGINE_1": "Auto (nur Polen)",
|
||||
"ENGINE_2": "Fahrrad (nur Polen)",
|
||||
// directions
|
||||
"N": "Norden",
|
||||
"E": "Ost",
|
||||
|
||||
@@ -66,6 +66,10 @@ OSRM.Localization["en"] = {
|
||||
// printing
|
||||
"OVERVIEW_MAP": "Overview Map",
|
||||
"NO_ROUTE_SELECTED": "No route selected",
|
||||
// routing engines
|
||||
"ENGINE_0": "Car (fastest route)",
|
||||
"ENGINE_1": "Car (Poland only)",
|
||||
"ENGINE_2": "Bike (Poland only)",
|
||||
// directions
|
||||
"N": "north",
|
||||
"E": "east",
|
||||
|
||||
@@ -54,8 +54,8 @@ setLanguageWrapper: function(language) { // wrapping required to correctly prev
|
||||
},
|
||||
setLanguage: function(language) {
|
||||
// change value of both language selectors
|
||||
OSRM.GUI.selectorChange( document.getElementById('gui-language-toggle'), language );
|
||||
OSRM.GUI.selectorChange( document.getElementById('gui-language-2-toggle'), language );
|
||||
OSRM.GUI.selectorChange( 'gui-language-toggle', language );
|
||||
OSRM.GUI.selectorChange( 'gui-language-2-toggle', language );
|
||||
|
||||
if( OSRM.Localization[language]) {
|
||||
OSRM.Localization.current_language = language;
|
||||
|
||||
Reference in New Issue
Block a user