diff --git a/WebContent/OSRM.base.js b/WebContent/OSRM.base.js index 6139f84e0..d31b9d73c 100644 --- a/WebContent/OSRM.base.js +++ b/WebContent/OSRM.base.js @@ -24,5 +24,6 @@ OSRM.DATE = '120705'; OSRM.CONSTANTS = {}; OSRM.DEFAULTS = {}; OSRM.GLOBALS = {}; +OSRM.Control = {}; // control container OSRM.G = OSRM.GLOBALS; // abbreviations OSRM.C = OSRM.CONSTANTS; diff --git a/WebContent/base/OSRM.Map.js b/WebContent/base/OSRM.Map.js index 8982f7f24..c698d5e9a 100644 --- a/WebContent/base/OSRM.Map.js +++ b/WebContent/base/OSRM.Map.js @@ -47,7 +47,7 @@ init: function() { } // setup map - OSRM.G.map = new OSRM.MapView('map', { + OSRM.G.map = new OSRM.Control.Map('map', { center: new L.LatLng(OSRM.DEFAULTS.ONLOAD_LATITUDE, OSRM.DEFAULTS.ONLOAD_LONGITUDE), zoom: OSRM.DEFAULTS.ONLOAD_ZOOM_LEVEL, layers: [base_maps[tile_servers[0].display_name]], @@ -57,18 +57,17 @@ init: function() { }); // add locations control - var locationsControl = new OSRM.Control.Locations(); - OSRM.G.map.addControl(locationsControl); + OSRM.G.map.locationsControl = new OSRM.Control.Locations(); + OSRM.G.map.locationsControl.addTo(OSRM.G.map); // add layer control - var layerControl = new L.Control.QueryableLayers(base_maps, {}); - OSRM.G.map.addLayerControl(layerControl); + OSRM.G.map.layerControl = new OSRM.Control.Layers(base_maps, {}); + OSRM.G.map.layerControl.addTo(OSRM.G.map); // add zoom control - var zoomControl = new OSRM.Control.Zoom(); - OSRM.G.map.addControl(zoomControl); - zoomControl.show(); - + OSRM.G.map.zoomControl = new OSRM.Control.Zoom(); + OSRM.G.map.zoomControl.addTo(OSRM.G.map); + OSRM.G.map.zoomControl.show(); // add scale control OSRM.G.map.scaleControl = new L.Control.Scale(); diff --git a/WebContent/base/leaflet/L.Control.QueryableLayers.js b/WebContent/base/osrm/OSRM.Control.Layers.js similarity index 50% rename from WebContent/base/leaflet/L.Control.QueryableLayers.js rename to WebContent/base/osrm/OSRM.Control.Layers.js index 7af74a738..ced4dff0b 100644 --- a/WebContent/base/leaflet/L.Control.QueryableLayers.js +++ b/WebContent/base/osrm/OSRM.Control.Layers.js @@ -15,9 +15,9 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA or see http://www.gnu.org/licenses/agpl.txt. */ -// queryable Layers control +// OSRM Layers control // [extension of Layers.Control with OSRM styling and additional query methods] -L.Control.QueryableLayers = L.Control.Layers.extend({ +OSRM.Control.Layers = L.Control.Layers.extend({ // query functionality getActiveLayerName: function () { @@ -48,7 +48,56 @@ getActiveLayer: function () { }, -// overwrite Control.Layers methods to get OSRM styling +// overwrite Control.Layers methods to get OSRM styling +onAdd: function (map) { + this._initLayout(map); + this._update(); + + return this._container; +}, +_initLayout: function (map) { + var className = 'leaflet-control-layers', + container = this._container = L.DomUtil.create('div', className); + + if (!L.Browser.touch) { + L.DomEvent.disableClickPropagation(container); + } else { + L.DomEvent.on(container, 'click', L.DomEvent.stopPropagation); + } + + var form = this._form = L.DomUtil.create('form', className + '-list'); + + if (this.options.collapsed) { + L.DomEvent + .on(container, 'mouseover', this._expand, this) + .on(container, 'mouseout', this._collapse, this); + + var link = this._layersLink = L.DomUtil.create('a', className + '-toggle', container); + link.href = '#'; + link.title = 'Layers'; + + if (L.Browser.touch) { + L.DomEvent + .on(link, 'click', L.DomEvent.stopPropagation) + .on(link, 'click', L.DomEvent.preventDefault) + .on(link, 'click', this._expand, this); + } + else { + L.DomEvent.on(link, 'focus', this._expand, this); + } + + this._map.on('movestart', this._collapse, this); + // TODO keyboard accessibility + } else { + this._expand(); + } + + this._baseLayersList = L.DomUtil.create('div', className + '-base', form); + this._separator = L.DomUtil.create('div', className + '-separator', form); + this._overlaysList = L.DomUtil.create('div', className + '-overlays', form); + + container.appendChild(form); +}, _expand: function () { L.DomUtil.addClass(this._container, 'leaflet-control-layers-expanded'); }, diff --git a/WebContent/base/osrm/OSRM.Control.Locations.js b/WebContent/base/osrm/OSRM.Control.Locations.js index 8a0733117..6ecee452d 100644 --- a/WebContent/base/osrm/OSRM.Control.Locations.js +++ b/WebContent/base/osrm/OSRM.Control.Locations.js @@ -17,34 +17,28 @@ or see http://www.gnu.org/licenses/agpl.txt. // locations control // [navigation buttons for important locations - zoom on route, zoom on user] -OSRM.Control = OSRM.Control || {}; OSRM.Control.Locations = L.Control.extend({ options: { position: 'topright' }, onAdd: function (map) { - // unique control - if( document.getElementById('gui-control-locations') ) - return document.getElementById('gui-control-locations'); - // create wrapper var container = L.DomUtil.create('div', 'box-wrapper gui-control-wrapper'); - container.id = 'gui-control-locations'; L.DomEvent.disableClickPropagation(container); // create buttons - this._createButton('gui-locations-user', container, OSRM.GUI.zoomOnUser, map, !!navigator.geolocation ); - this._createButton('gui-locations-route', container, OSRM.GUI.zoomOnRoute, map, false); + this._userButton = this._createButton('gui-locations-user', container, OSRM.GUI.zoomOnUser, map, !!navigator.geolocation ); + this._routeButton = this._createButton('gui-locations-route', container, OSRM.GUI.zoomOnRoute, map, false); + this._container = container; return container; }, _createButton: function (id, container, fn, context, isActive) { var inactive = (isActive == false) ? "-inactive" : ""; - var classNames = "box-content" + " " + "gui-control"+inactive + " " + id+inactive; + var classNames = "box-content gui-control " + id+inactive; var link = L.DomUtil.create('a', classNames, container); - link.id = id; link.title = id; L.DomEvent @@ -56,10 +50,14 @@ OSRM.Control.Locations = L.Control.extend({ return link; }, - activate: function (id) { - document.getElementById(id).className = "box-content gui-control " + id; + activateRoute: function() { + this._routeButton.className = "box-content gui-control gui-locations-route"; }, - deactivate: function (id) { - document.getElementById(id).className = "box-content gui-control-inactive " + id + "-inactive"; + deactivateRoute: function() { + this._routeButton.className = "box-content gui-control gui-locations-route-inactive"; + }, + setTooltips: function( userButton, routeButton) { + this._userButton.title = userButton; + this._routeButton.title = routeButton; } }); diff --git a/WebContent/base/osrm/OSRM.MapView.js b/WebContent/base/osrm/OSRM.Control.Map.js similarity index 90% rename from WebContent/base/osrm/OSRM.MapView.js rename to WebContent/base/osrm/OSRM.Control.Map.js index 0f5f79e18..1751386f0 100644 --- a/WebContent/base/osrm/OSRM.MapView.js +++ b/WebContent/base/osrm/OSRM.Control.Map.js @@ -15,9 +15,9 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA or see http://www.gnu.org/licenses/agpl.txt. */ -// map view/model -// [extending Leaflet L.Map with setView/fitBounds methods that respect UI visibility, better layerControl] -OSRM.MapView = L.Map.extend({ +// OSRM Map control +// [extension of L.Map with additional view & bounds methods that respect OSRM UI visibility; methods for querying active layers] +OSRM.Control.Map = L.Map.extend({ _boundsInsideView: function(bounds) { var viewBounds = this.getBounds(), viewSw = this.project(viewBounds.getSouthWest()), @@ -106,13 +106,6 @@ OSRM.MapView = L.Map.extend({ return this.unproject(centerPoint, this._zoom, unbounded); }, - addLayerControl: function( layerControl ) { - if( this.layerControl ) - return; - - this.layerControl = layerControl; - this.addControl(this.layerControl); - }, getActiveLayerId: function() { var tile_server_id = 0; diff --git a/WebContent/base/osrm/OSRM.Control.Zoom.js b/WebContent/base/osrm/OSRM.Control.Zoom.js index af1500597..af19b52d4 100644 --- a/WebContent/base/osrm/OSRM.Control.Zoom.js +++ b/WebContent/base/osrm/OSRM.Control.Zoom.js @@ -17,34 +17,28 @@ or see http://www.gnu.org/licenses/agpl.txt. // zoom control // [modified zoom control with ids, prevention of click propagation, show/hide with respect to main OSRM window] -OSRM.Control = OSRM.Control || {}; OSRM.Control.Zoom = L.Control.extend({ options: { position: 'topleft' }, onAdd: function (map) { - // unique control - if( document.getElementById('gui-control-zoom') ) - return document.getElementById('gui-control-zoom'); - // create wrapper var container = L.DomUtil.create('div', 'box-wrapper gui-control-wrapper'); - container.id = 'gui-control-zoom'; L.DomEvent.disableClickPropagation(container); // create buttons - this._createButton('gui-zoom-in', container, map.zoomIn, map, true); - this._createButton('gui-zoom-out', container, map.zoomOut, map, true); - + this._zoomIn = this._createButton('gui-zoom-in', container, map.zoomIn, map, true); + this._zoomOut = this._createButton('gui-zoom-out', container, map.zoomOut, map, true); + + this._container = container; return container; }, _createButton: function (id, container, fn, context, isActive) { var inactive = (isActive == false) ? "-inactive" : ""; - var classNames = "box-content" + " " + "gui-control"+inactive + " " + id+inactive; + var classNames = "box-content gui-control " + id+inactive; var link = L.DomUtil.create('a', classNames, container); - link.id = id; link.title = id; L.DomEvent @@ -57,17 +51,19 @@ OSRM.Control.Zoom = L.Control.extend({ }, hide: function() { - var zoom_controls = document.getElementById("gui-control-zoom"); - if( zoom_controls ) - zoom_controls.style.visibility="hidden"; + if( this._container ) + this._container.style.visibility="hidden"; }, show: function() { - var zoom_controls = document.getElementById("gui-control-zoom"); - if( zoom_controls ) { - zoom_controls.style.top = "5px"; - zoom_controls.style.left = ( OSRM.G.main_handle.boxVisible() == true ? (OSRM.G.main_handle.boxWidth()+10) : "30") + "px"; - zoom_controls.style.visibility="visible"; + if( this._container ) { + this._container.style.top = "5px"; + this._container.style.left = ( OSRM.G.main_handle.boxVisible() == true ? (OSRM.G.main_handle.boxWidth()+10) : "30") + "px"; + this._container.style.visibility="visible"; } + }, + setTooltips: function( zoomIn, zoomOut) { + this._zoomIn.title = zoomIn; + this._zoomOut.title = zoomOut; } }); diff --git a/WebContent/gui/OSRM.GUIBoxHandle.js b/WebContent/gui/OSRM.GUIBoxHandle.js index 0a07e57b7..334c356a2 100644 --- a/WebContent/gui/OSRM.GUIBoxHandle.js +++ b/WebContent/gui/OSRM.GUIBoxHandle.js @@ -99,7 +99,6 @@ $showBox: function() { this._box.style.visibility="visible"; this._handle.style.visibility="hidden"; this._box.style[this._side]="5px"; - this._transitionEndFct(); }, $hideBox: function() { this._box_visible = false; diff --git a/WebContent/gui/OSRM.MainGUI.js b/WebContent/gui/OSRM.MainGUI.js index 6eb85315f..7bc52760d 100644 --- a/WebContent/gui/OSRM.MainGUI.js +++ b/WebContent/gui/OSRM.MainGUI.js @@ -71,10 +71,8 @@ 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.G.map.zoomControl.setTooltips( OSRM.loc("GUI_ZOOM_IN"), OSRM.loc("GUI_ZOOM_OUT") ); + OSRM.G.map.locationsControl.setTooltips( OSRM.loc("GUI_ZOOM_ON_USER"), OSRM.loc("GUI_ZOOM_ON_ROUTE") ); OSRM.GUI.setDistanceFormatsLanguage(); OSRM.GUI.setRoutingEnginesLanguage(); }, @@ -87,11 +85,11 @@ clearResults: function() { // reposition and hide zoom controls before main box animation beforeMainTransition: function() { - OSRM.Control.Zoom.prototype.hide(); + OSRM.G.map.zoomControl.hide(); }, // show zoom controls after main box animation afterMainTransition: function() { - OSRM.Control.Zoom.prototype.show(); + OSRM.G.map.zoomControl.show(); }, // distance format routines diff --git a/WebContent/gui/OSRM.RoutingGUI.js b/WebContent/gui/OSRM.RoutingGUI.js index 25b86a5c5..a84d05036 100644 --- a/WebContent/gui/OSRM.RoutingGUI.js +++ b/WebContent/gui/OSRM.RoutingGUI.js @@ -46,11 +46,11 @@ init: function() { // toggle GUI features that need a route to work activateRouteFeatures: function() { OSRM.Printing.activate(); - OSRM.Control.Locations.prototype.activate('gui-locations-route'); + OSRM.G.map.locationsControl.activateRoute(); }, deactivateRouteFeatures: function() { OSRM.Printing.deactivate(); - OSRM.Control.Locations.prototype.deactivate('gui-locations-route'); + OSRM.G.map.locationsControl.deactivateRoute(); }, // click: button "reset" diff --git a/WebContent/images/locations_route_inactive.png b/WebContent/images/locations_route_inactive.png index add92b08f..62c000f97 100644 Binary files a/WebContent/images/locations_route_inactive.png and b/WebContent/images/locations_route_inactive.png differ diff --git a/WebContent/images/locations_user_inactive.png b/WebContent/images/locations_user_inactive.png index 1dda1b5a6..9b13dcf28 100644 Binary files a/WebContent/images/locations_user_inactive.png and b/WebContent/images/locations_user_inactive.png differ diff --git a/WebContent/localization/OSRM.Locale.bg.js b/WebContent/localization/OSRM.Locale.bg.js index 6b6929e30..c7cfd841a 100644 --- a/WebContent/localization/OSRM.Locale.bg.js +++ b/WebContent/localization/OSRM.Locale.bg.js @@ -34,6 +34,8 @@ OSRM.Localization["bg"] = { "GUI_START_TOOLTIP": "Въведи начало", "GUI_END_TOOLTIP": "Въведи карйна цел", "GUI_MAIN_WINDOW": "главния прозорец", +"GUI_ZOOM_IN": "Приближаване", +"GUI_ZOOM_OUT": "Oтдалечаване", // config "GUI_CONFIGURATION": "Конфигурация", "GUI_LANGUAGE": "Език", @@ -66,6 +68,8 @@ OSRM.Localization["bg"] = { // printing "OVERVIEW_MAP": "сбит изглед", "NO_ROUTE_SELECTED": "Не е изберан маршрут", +// routing engines +"ENGINE_0": "Kола (най-бързо)", // directions "N": "север", "E": "изток", diff --git a/WebContent/localization/OSRM.Locale.cs.js b/WebContent/localization/OSRM.Locale.cs.js index e765cff96..200a58d4f 100644 --- a/WebContent/localization/OSRM.Locale.cs.js +++ b/WebContent/localization/OSRM.Locale.cs.js @@ -23,7 +23,7 @@ OSRM.Localization["cs"] = { // own language "CULTURE": "cs-CZ", "LANGUAGE": "česky", -//gui +// gui "GUI_START": "Odkud", "GUI_END": "Kam", "GUI_RESET": "Vyčistit", @@ -32,7 +32,9 @@ OSRM.Localization["cs"] = { "GUI_REVERSE": "Prohodit", "GUI_START_TOOLTIP": "Zadejte začátek cesty", "GUI_END_TOOLTIP": "Zadejte cíl cesty", -//config +"GUI_ZOOM_IN": "Najíždět", +"GUI_ZOOM_OUT": "Oddálit", +// config "GUI_CONFIGURATION": "Nastavení", "GUI_LANGUAGE": "Jazyk", "GUI_UNITS": "Jednotky", @@ -61,9 +63,11 @@ OSRM.Localization["cs"] = { "DURATION": "Doba", "YOUR_ROUTE_IS_BEING_COMPUTED": "Vaše trasa byla vyznačena", "NO_ROUTE_FOUND": "Trasu nelze vyznačit", -//printing +// printing "OVERVIEW_MAP": "Přehledová mapka", "NO_ROUTE_SELECTED": "Ne vybranou trasu", +// routing engines +"ENGINE_0": "Auto (nejrychlejší)", // directions "N": "sever", "E": "východ", @@ -100,6 +104,6 @@ OSRM.Localization["cs"] = { "DIRECTION_15":"Jste u cíle" }; -//set GUI language on load +// set GUI language on load if( OSRM.DEFAULTS.LANUGAGE_ONDEMAND_RELOADING == true ) OSRM.Localization.setLanguage("cs"); diff --git a/WebContent/localization/OSRM.Locale.de.js b/WebContent/localization/OSRM.Locale.de.js index 8dc3b1eb0..38cf5b6ed 100644 --- a/WebContent/localization/OSRM.Locale.de.js +++ b/WebContent/localization/OSRM.Locale.de.js @@ -34,6 +34,8 @@ OSRM.Localization["de"] = { "GUI_START_TOOLTIP": "Startposition eingeben", "GUI_END_TOOLTIP": "Zielposition eingeben", "GUI_MAIN_WINDOW": "Hauptfenster", +"GUI_ZOOM_IN": "Vergrößern", +"GUI_ZOOM_OUT": "Verkleinern", // config "GUI_CONFIGURATION": "Einstellungen", "GUI_LANGUAGE": "Sprache", @@ -67,7 +69,7 @@ OSRM.Localization["de"] = { "OVERVIEW_MAP": "Übersichtskarte", "NO_ROUTE_SELECTED": "Keine Route ausgewählt", //routing engines -"ENGINE_0": "Auto (schnellste Strecke)", +"ENGINE_0": "Auto (schnellste)", "ENGINE_1": "Auto (nur Polen)", "ENGINE_2": "Fahrrad (nur Polen)", // directions diff --git a/WebContent/localization/OSRM.Locale.dk.js b/WebContent/localization/OSRM.Locale.dk.js index 7046e567e..85feb9f9a 100644 --- a/WebContent/localization/OSRM.Locale.dk.js +++ b/WebContent/localization/OSRM.Locale.dk.js @@ -23,7 +23,7 @@ OSRM.Localization["dk"] = { // own language "CULTURE": "da-DK", "LANGUAGE": "Dansk", -//gui +// gui "GUI_START": "Start", "GUI_END": "Destination", "GUI_RESET": "Nulstil", @@ -34,7 +34,9 @@ OSRM.Localization["dk"] = { "GUI_START_TOOLTIP": "Indtast start", "GUI_END_TOOLTIP": "Indtast destination", "GUI_MAIN_WINDOW": "Hovedvinduet", -//config +"GUI_ZOOM_IN": "Zoome ind", +"GUI_ZOOM_OUT": "Zoome ud", +// config "GUI_CONFIGURATION": "Konfiguration", "GUI_LANGUAGE": "Sprog", "GUI_UNITS": "Enheder", @@ -53,7 +55,7 @@ OSRM.Localization["dk"] = { "NO_RESULTS_FOUND": "Ingen resultater", "NO_RESULTS_FOUND_SOURCE": "Ingen resultater for start", "NO_RESULTS_FOUND_TARGET": "Ingen resultater for destination", -//routing +// routing "ROUTE_DESCRIPTION": "Rutebeskrivelse", "GET_LINK_TO_ROUTE": "Lav link", "GENERATE_LINK_TO_ROUTE": "venter på link", @@ -63,9 +65,11 @@ OSRM.Localization["dk"] = { "DURATION": "Varighed", "YOUR_ROUTE_IS_BEING_COMPUTED": "Din rute bliver beregnet", "NO_ROUTE_FOUND": "Ingen mulig rute fundet", -//printing +// printing "OVERVIEW_MAP": "Oversigtskort", "NO_ROUTE_SELECTED": "Ikke valgte rute", +// routing engines +"ENGINE_0": "Bil (hurtigste)", // directions "N": "nord", "E": "øst", @@ -102,6 +106,6 @@ OSRM.Localization["dk"] = { "DIRECTION_15":"Du er ankommet til din destination" }; -//set GUI language on load +// set GUI language on load if( OSRM.DEFAULTS.LANUGAGE_ONDEMAND_RELOADING == true ) OSRM.Localization.setLanguage("dk"); diff --git a/WebContent/localization/OSRM.Locale.en.js b/WebContent/localization/OSRM.Locale.en.js index 39d8444a4..7282943c3 100644 --- a/WebContent/localization/OSRM.Locale.en.js +++ b/WebContent/localization/OSRM.Locale.en.js @@ -34,6 +34,8 @@ OSRM.Localization["en"] = { "GUI_START_TOOLTIP": "Enter start", "GUI_END_TOOLTIP": "Enter destination", "GUI_MAIN_WINDOW": "Main window", +"GUI_ZOOM_IN": "Zoom in", +"GUI_ZOOM_OUT": "Zoom out", // config "GUI_CONFIGURATION": "Configuration", "GUI_LANGUAGE": "Language", @@ -67,7 +69,7 @@ OSRM.Localization["en"] = { "OVERVIEW_MAP": "Overview Map", "NO_ROUTE_SELECTED": "No route selected", // routing engines -"ENGINE_0": "Car (fastest route)", +"ENGINE_0": "Car (fastest)", "ENGINE_1": "Car (Poland only)", "ENGINE_2": "Bike (Poland only)", // directions diff --git a/WebContent/localization/OSRM.Locale.es.js b/WebContent/localization/OSRM.Locale.es.js index c2d2e89b0..46d64409a 100644 --- a/WebContent/localization/OSRM.Locale.es.js +++ b/WebContent/localization/OSRM.Locale.es.js @@ -34,6 +34,8 @@ OSRM.Localization["es"] = { "GUI_START_TOOLTIP": "Escriba la dirección de origen", "GUI_END_TOOLTIP": "Escriba la dirección de destino", "GUI_MAIN_WINDOW": "Ventana principal", +"GUI_ZOOM_IN": "Ampliar", +"GUI_ZOOM_OUT": "Alejar", // config "GUI_CONFIGURATION": "Configuración", "GUI_LANGUAGE": "Idioma", @@ -66,6 +68,8 @@ OSRM.Localization["es"] = { // printing "OVERVIEW_MAP": "Mapa de referencia", "NO_ROUTE_SELECTED": "Ninguna ruta seleccionada", +// routing engines +"ENGINE_0": "Coche (el más rápido)", // directions "N": "norte", "E": "este", diff --git a/WebContent/localization/OSRM.Locale.fi.js b/WebContent/localization/OSRM.Locale.fi.js index 43a211b77..dc9e6e9dc 100644 --- a/WebContent/localization/OSRM.Locale.fi.js +++ b/WebContent/localization/OSRM.Locale.fi.js @@ -23,7 +23,7 @@ OSRM.Localization["fi"] = { // own language "CULTURE": "fi-FI", "LANGUAGE": "Suomi", -//gui +// gui "GUI_START": "Lähtöpaikka", "GUI_END": "Määränpää", "GUI_RESET": "Tyhjennä", @@ -34,7 +34,9 @@ OSRM.Localization["fi"] = { "GUI_START_TOOLTIP": "Syötä lähtöpaikka", "GUI_END_TOOLTIP": "Syötä määränpää", "GUI_MAIN_WINDOW": "Pääikkuna", -//config +"GUI_ZOOM_IN": "Lähennä", +"GUI_ZOOM_OUT": "Loitonna", +// config "GUI_CONFIGURATION": "Kokoonpano", "GUI_LANGUAGE": "Kieli", "GUI_UNITS": "Yksiköt", @@ -53,7 +55,7 @@ OSRM.Localization["fi"] = { "NO_RESULTS_FOUND": "Ei hakutuloksia", "NO_RESULTS_FOUND_SOURCE": "Ei hakutuloksia lähtöpaikka", "NO_RESULTS_FOUND_TARGET": "Ei hakutuloksia määränpäälle", -//routing +// routing "ROUTE_DESCRIPTION": "Reittiohjeet", "GET_LINK_TO_ROUTE": "Luo linkki", "GENERATE_LINK_TO_ROUTE": "odotetaan linkkiä", @@ -63,9 +65,11 @@ OSRM.Localization["fi"] = { "DURATION": "Aika", "YOUR_ROUTE_IS_BEING_COMPUTED": "Reittiä lasketaan", "NO_ROUTE_FOUND": "Reittiä ei löytynyt", -//printing +// printing "OVERVIEW_MAP": "Yleiskuvakartta", "NO_ROUTE_SELECTED": "Ei reitti valittu", +// routing engines +"ENGINE_0": "Auton (nopein)", // directions "N": "pohjoiseen", "E": "itään", @@ -102,6 +106,6 @@ OSRM.Localization["fi"] = { "DIRECTION_15":"Saavuit määränpäähän" }; -//set GUI language tielle load +// set GUI language tielle load if( OSRM.DEFAULTS.LANUGAGE_ONDEMAND_RELOADING == true ) OSRM.Localization.setLanguage("fi"); diff --git a/WebContent/localization/OSRM.Locale.fr.js b/WebContent/localization/OSRM.Locale.fr.js index db3aefe90..079044350 100644 --- a/WebContent/localization/OSRM.Locale.fr.js +++ b/WebContent/localization/OSRM.Locale.fr.js @@ -34,7 +34,9 @@ OSRM.Localization["fr"] = { "GUI_START_TOOLTIP": "Entrez le lieu de départ", "GUI_END_TOOLTIP": "Entrez le lieu d’arrivée", "GUI_MAIN_WINDOW": "Fenêtre principale", -//config +"GUI_ZOOM_IN": "Zoomer", +"GUI_ZOOM_OUT": "Rétrécir", +// config "GUI_CONFIGURATION": "Configuration", "GUI_LANGUAGE": "Langue", "GUI_UNITS": "Unités", @@ -53,7 +55,7 @@ OSRM.Localization["fr"] = { "NO_RESULTS_FOUND": "Aucun résultat trouvé", "NO_RESULTS_FOUND_SOURCE": "Aucun résultat pour le départ", "NO_RESULTS_FOUND_TARGET": "Aucun résultat pour l'arrivée", -//routing +// routing "ROUTE_DESCRIPTION": "Description de l’itinéraire", "GET_LINK_TO_ROUTE": "Générer un lien", "GENERATE_LINK_TO_ROUTE": "en attente du lien", @@ -63,9 +65,11 @@ OSRM.Localization["fr"] = { "DURATION": "Durée", "YOUR_ROUTE_IS_BEING_COMPUTED": "Votre itinéraire est en cours de calcul", "NO_ROUTE_FOUND": "Pas d’itinéraire possible", -//printing +// printing "OVERVIEW_MAP": "Carte", "NO_ROUTE_SELECTED": "Pas d’itinéraire choisi", +// routing engines +"ENGINE_0": "voiture (le plus rapide)", // directions "N": "nord", "E": "est", @@ -101,6 +105,6 @@ OSRM.Localization["fr"] = { "DIRECTION_15":"Vous êtes arrivé" }; -//set GUI language on load +// set GUI language on load if( OSRM.DEFAULTS.LANUGAGE_ONDEMAND_RELOADING == true ) OSRM.Localization.setLanguage("fr"); diff --git a/WebContent/localization/OSRM.Locale.it.js b/WebContent/localization/OSRM.Locale.it.js index 455ae7ad7..a4ebf6556 100644 --- a/WebContent/localization/OSRM.Locale.it.js +++ b/WebContent/localization/OSRM.Locale.it.js @@ -23,7 +23,7 @@ OSRM.Localization["it"] = { // own language "CULTURE": "it-IT", "LANGUAGE": "Italiano", -//gui +// gui "GUI_START": "Partenza", "GUI_END": "Destinazione", "GUI_RESET": "Reset", @@ -34,7 +34,9 @@ OSRM.Localization["it"] = { "GUI_START_TOOLTIP": "Inserire la Partenza", "GUI_END_TOOLTIP": "Inserire la destinazione", "GUI_MAIN_WINDOW": "Finestra principale", -//config +"GUI_ZOOM_IN": "Ingrandire", +"GUI_ZOOM_OUT": "Diminuire", +// config "GUI_CONFIGURATION": "Configurazione", "GUI_LANGUAGE": "Lingua", "GUI_UNITS": "Unità", @@ -53,7 +55,7 @@ OSRM.Localization["it"] = { "NO_RESULTS_FOUND": "Nessun risultato trovato", "NO_RESULTS_FOUND_SOURCE": "Nessun risultato trovato per la partenza", "NO_RESULTS_FOUND_TARGET": "Nessun risultato trovato per la destinazione", -//routing +// routing "ROUTE_DESCRIPTION": "Descrizione del percorso", "GET_LINK_TO_ROUTE": "Genera un Link", "GENERATE_LINK_TO_ROUTE": "in attesa del link", @@ -63,8 +65,10 @@ OSRM.Localization["it"] = { "DURATION": "Durata", "YOUR_ROUTE_IS_BEING_COMPUTED": "Sto calcolando il tuo percorso", "NO_ROUTE_FOUND": "Nessun percorso possibile", -//printing +// printing "OVERVIEW_MAP": "Mappa d'insieme", +// routing engines +"ENGINE_0": "Macchina (più veloce)", // directions "N": "nord", "E": "est", @@ -101,6 +105,6 @@ OSRM.Localization["it"] = { "DIRECTION_15":"Hai raggiunto la tua destinazione" }; -//set GUI language on load +// set GUI language on load if( OSRM.DEFAULTS.LANUGAGE_ONDEMAND_RELOADING == true ) OSRM.Localization.setLanguage("it"); diff --git a/WebContent/localization/OSRM.Locale.lv.js b/WebContent/localization/OSRM.Locale.lv.js index 811de83dd..de625f977 100644 --- a/WebContent/localization/OSRM.Locale.lv.js +++ b/WebContent/localization/OSRM.Locale.lv.js @@ -34,6 +34,8 @@ OSRM.Localization["lv"] = { "GUI_START_TOOLTIP": "Izvēlieties sākumu", "GUI_END_TOOLTIP": "Izvēlieties galamērķi", "GUI_MAIN_WINDOW": "Galvenais logs", +"GUI_ZOOM_IN": "Palielinātu", +"GUI_ZOOM_OUT": "Attālinātu", // config "GUI_CONFIGURATION": "Konfigurācija", "GUI_LANGUAGE": "Valoda", @@ -66,6 +68,8 @@ OSRM.Localization["lv"] = { // printing "OVERVIEW_MAP": "Kartes pārskats", "NO_ROUTE_SELECTED": "Nav norādīts maršruts", +// routing engines +"ENGINE_0": "Auto (ātrākais)", // directions "N": "ziemeļu", "E": "austrumu", diff --git a/WebContent/localization/OSRM.Locale.pl.js b/WebContent/localization/OSRM.Locale.pl.js index b0c5f9d40..3fb07d7dd 100644 --- a/WebContent/localization/OSRM.Locale.pl.js +++ b/WebContent/localization/OSRM.Locale.pl.js @@ -23,7 +23,7 @@ OSRM.Localization["pl"] = { // own language "CULTURE": "pl-PL", "LANGUAGE": "Polski", -//gui +// gui "GUI_START": "Początek", "GUI_END": "Koniec", "GUI_RESET": "Reset", @@ -34,7 +34,9 @@ OSRM.Localization["pl"] = { "GUI_START_TOOLTIP": "Wprowadź początek", "GUI_END_TOOLTIP": "Wprowadź koniec", "GUI_MAIN_WINDOW": "Główne okno", -//config +"GUI_ZOOM_IN": "Powiększyć", +"GUI_ZOOM_OUT": "Pomniejszyć", +// config "GUI_CONFIGURATION": "Konfiguracja", "GUI_LANGUAGE": "Język", "GUI_UNITS": "Jednostki", @@ -53,7 +55,7 @@ OSRM.Localization["pl"] = { "NO_RESULTS_FOUND": "Brak wyników", "NO_RESULTS_FOUND_SOURCE": "Brak wyników dla początku trasy", "NO_RESULTS_FOUND_TARGET": "Brak wyników dla końca trasy", -//routing +// routing "ROUTE_DESCRIPTION": "Opis trasy", "GET_LINK_TO_ROUTE": "Generuj link", "GENERATE_LINK_TO_ROUTE": "oczekiwanie na link", @@ -63,8 +65,10 @@ OSRM.Localization["pl"] = { "DURATION": "Czas", "YOUR_ROUTE_IS_BEING_COMPUTED": "Twoja trasa została wyznaczona", "NO_ROUTE_FOUND": "Nie można wyznaczyć trasy", -//printing +// printing "OVERVIEW_MAP": "Mapa poglądowa", +// routing engines +"ENGINE_0": "samochód (najszybciej)", // directions "N": "północ", "E": "wschód", @@ -101,6 +105,6 @@ OSRM.Localization["pl"] = { "DIRECTION_15":"Cel został osiągnięty" }; -//set GUI language on load +// set GUI language on load if( OSRM.DEFAULTS.LANUGAGE_ONDEMAND_RELOADING == true ) OSRM.Localization.setLanguage("pl"); diff --git a/WebContent/localization/OSRM.Locale.ru.js b/WebContent/localization/OSRM.Locale.ru.js index 352933f34..29d00fb8b 100644 --- a/WebContent/localization/OSRM.Locale.ru.js +++ b/WebContent/localization/OSRM.Locale.ru.js @@ -26,14 +26,16 @@ OSRM.Localization["ru"] = { // gui "GUI_START": "Начало", "GUI_END": "Конец", -"GUI_RESET": "  Сброс  ", +"GUI_RESET": "Сброс", "GUI_ZOOM_ON_ROUTE": "зум на маршрут", "GUI_ZOOM_ON_USER": "зум на Пользователь", -"GUI_SEARCH": "  Показать  ", +"GUI_SEARCH": "Показать", "GUI_REVERSE": "Обратно", "GUI_START_TOOLTIP": "Укажите начальную точку", "GUI_END_TOOLTIP": "Укажите пункт назначения", "GUI_MAIN_WINDOW": "Главное окно", +"GUI_ZOOM_IN": "Yвеличить", +"GUI_ZOOM_OUT": "Mасштаб", // config "GUI_CONFIGURATION": "Настройки", "GUI_LANGUAGE": "Язык", @@ -66,6 +68,8 @@ OSRM.Localization["ru"] = { // printing "OVERVIEW_MAP": "Обзорная карта", "NO_ROUTE_SELECTED": "Маршрут не выбран", +// routing engines +"ENGINE_0": "Aвтомобиля (быстрый)", // directions "N": "север", "E": "восток", diff --git a/WebContent/main.css b/WebContent/main.css index 2c46e5e24..243803e5f 100644 --- a/WebContent/main.css +++ b/WebContent/main.css @@ -35,7 +35,7 @@ html, body { /* changes/additions to leaflet styles */ .leaflet-control-layers { - box-shadow: 0 0px 0px; + box-shadow: none; border-radius:10px; -moz-border-radius:10px; -webkit-border-radius:10px; @@ -547,14 +547,6 @@ html, body { background-repeat: no-repeat; display: block; } -.gui-control-inactive { - cursor:default; - position:relative; - background-position: 50% 50%; - background-repeat: no-repeat; - display: block; - background-color: #EFEFEF; -} /* zoom buttons */ @@ -766,3 +758,68 @@ input[type=checkbox], font-size: 9px; font-weight: normal; } + + + + + + +/* .leaflet-control-layers { + box-shadow: 0 1px 7px #999; + background: #f8f8f9; + -moz-border-radius: 8px; + -webkit-border-radius: 8px; + border-radius: 8px; + } +.leaflet-touch .leaflet-control-layers { + box-shadow: none; + border: 5px solid #bbb; + } + + +.leaflet-control-layers a { + background-position: 50% 50%; + background-repeat: no-repeat; + display: block; + background-image: url(images/layers.png); + width: 36px; + height: 36px; + } +.leaflet-touch .leaflet-control-layers a { + width: 44px; + height: 44px; + } + + +.leaflet-control-layers .leaflet-control-layers-list, +.leaflet-control-layers-expanded .leaflet-control-layers-toggle { + display: none; + } +.leaflet-control-layers-expanded .leaflet-control-layers-list { + display: block; + position: relative; + } + + + +.leaflet-control-layers-expanded { + padding: 6px 10px 6px 6px; + font: 12px/1.5 "Helvetica Neue", Arial, Helvetica, sans-serif; + color: #333; + background: #fff; + } + + +.leaflet-control-layers input { + margin-top: 2px; + position: relative; + top: 1px; + } +.leaflet-control-layers label { + display: block; + } +.leaflet-control-layers-separator { + height: 0; + border-top: 1px solid #ddd; + margin: 5px -10px 5px -6px; + } */ \ No newline at end of file diff --git a/WebContent/main.html b/WebContent/main.html index d6baa6c96..5a7580e8b 100644 --- a/WebContent/main.html +++ b/WebContent/main.html @@ -37,7 +37,6 @@ or see http://www.gnu.org/licenses/agpl.txt. - @@ -50,9 +49,10 @@ or see http://www.gnu.org/licenses/agpl.txt. + - + diff --git a/WebContent/printing/printing.html b/WebContent/printing/printing.html index a10063a56..7f6054b5b 100644 --- a/WebContent/printing/printing.html +++ b/WebContent/printing/printing.html @@ -41,7 +41,7 @@ or see http://www.gnu.org/licenses/agpl.txt. - + diff --git a/WebContent/printing/printing.js b/WebContent/printing/printing.js index 7b8fe1a6b..465a34ca2 100644 --- a/WebContent/printing/printing.js +++ b/WebContent/printing/printing.js @@ -62,7 +62,7 @@ OSRM.drawMap = function(tile_server, bounds) { if( tile_server.bing ) tile_layer = new L.BingLayer(tile_server.apikey, tile_server.options); else tile_layer = new L.TileLayer(tile_server.url, tile_server.options); tile_layer.options.culture = OSRM.G.Localization.culture; - OSRM.G.map = new OSRM.MapView("overview-map", { + OSRM.G.map = new OSRM.Control.Map("overview-map", { center: new L.LatLng(48.84, 10.10), zoom: 13, zoomAnimation: false,