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:
DennisSchiefer
2012-08-24 13:27:21 +01:00
parent e98afb46e7
commit 532d7cb057
16 changed files with 198 additions and 73 deletions
+1 -1
View File
@@ -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");
+2 -2
View File
@@ -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