added new buttons for map zooming and requesting important locations

This commit is contained in:
DennisSchiefer
2012-08-27 10:27:19 +01:00
parent 94ad1003e9
commit d3d3ebb5de
25 changed files with 302 additions and 290 deletions
+6 -8
View File
@@ -71,6 +71,10 @@ setLabels: function() {
document.getElementById('config-handle-icon').title = OSRM.loc("GUI_CONFIGURATION");
document.getElementById('mapping-handle-icon').title = OSRM.loc("GUI_MAPPING_TOOLS");
document.getElementById('main-handle-icon').title = OSRM.loc("GUI_MAIN_WINDOW");
document.getElementById('gui-locations-route').title = OSRM.loc("GUI_ZOOM_ON_ROUTE");
document.getElementById('gui-locations-user').title = OSRM.loc("GUI_ZOOM_ON_USER");
document.getElementById('gui-zoom-in').title = OSRM.loc("GUI_ZOOM_IN");
document.getElementById('gui-zoom-out').title = OSRM.loc("GUI_ZOOM_OUT");
OSRM.GUI.setDistanceFormatsLanguage();
OSRM.GUI.setRoutingEnginesLanguage();
},
@@ -83,17 +87,11 @@ clearResults: function() {
// reposition and hide zoom controls before main box animation
beforeMainTransition: function() {
var zoom_controls = OSRM.Browser.getElementsByClassName(document,'leaflet-control-zoom');
if( zoom_controls.length > 0)
zoom_controls[0].style.visibility="hidden";
OSRM.Control.Zoom.prototype.hide();
},
// show zoom controls after main box animation
afterMainTransition: function() {
var zoom_controls = OSRM.Browser.getElementsByClassName(document,'leaflet-control-zoom');
if( zoom_controls.length > 0) {
zoom_controls[0].style.left = ( OSRM.G.main_handle.boxVisible() == true ? (OSRM.G.main_handle.boxWidth()+10) : "30") + "px";
zoom_controls[0].style.visibility="visible";
}
OSRM.Control.Zoom.prototype.show();
},
// distance format routines
+2 -4
View File
@@ -46,13 +46,11 @@ init: function() {
// toggle GUI features that need a route to work
activateRouteFeatures: function() {
OSRM.Printing.activate();
// document.getElementById("gui-zoom").className = "button";
// document.getElementById('leaflet-control-locations-route').className = "leaflet-control-locations-route";
OSRM.Control.Locations.prototype.activate('gui-locations-route');
},
deactivateRouteFeatures: function() {
OSRM.Printing.deactivate();
// document.getElementById("gui-zoom").className = "button-inactive";
// document.getElementById('leaflet-control-locations-route').className = "leaflet-control-locations-route-inactive";
OSRM.Control.Locations.prototype.deactivate('gui-locations-route');
},
// click: button "reset"