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:
@@ -236,7 +236,7 @@ printWindowLoaded: function(){
|
||||
}
|
||||
|
||||
// scale control
|
||||
print_window.OSRM.G.DISTANCE_FORMAT = OSRM.G.DISTANCE_FORMAT;
|
||||
print_window.OSRM.G.active_distance_format = OSRM.G.active_distance_format;
|
||||
|
||||
// localization
|
||||
print_window.OSRM.G.Localization.culture = OSRM.loc("CULTURE");
|
||||
|
||||
@@ -78,8 +78,8 @@ OSRM.drawMap = function(tile_server, bounds) {
|
||||
|
||||
// add scale control
|
||||
OSRM.G.map.scaleControl = new L.Control.Scale();
|
||||
OSRM.G.map.scaleControl.options.metric = (OSRM.G.DISTANCE_FORMAT != 1);
|
||||
OSRM.G.map.scaleControl.options.imperial = (OSRM.G.DISTANCE_FORMAT == 1);
|
||||
OSRM.G.map.scaleControl.options.metric = (OSRM.G.active_distance_format != 1);
|
||||
OSRM.G.map.scaleControl.options.imperial = (OSRM.G.active_distance_format == 1);
|
||||
OSRM.G.map.scaleControl.addTo(OSRM.G.map);
|
||||
|
||||
// need to rebuild objects for instanceof to work correctly
|
||||
|
||||
Reference in New Issue
Block a user