diff --git a/AUTHORS.md b/AUTHORS.md index 5abba2efd..633125e4f 100644 --- a/AUTHORS.md +++ b/AUTHORS.md @@ -16,4 +16,9 @@ Juan Luis Rodriguez Ponce Lauris Bukšis-Haberkorns Barboska miszka999 -Konstantin Delchev \ No newline at end of file +Konstantin Delchev +Fumito Mizuno +Necdet Varoglu (OSM-Comenius Project) +Madalina Ionescu (OSM-Comenius Project) +Luis Costa (OSM-Comenius Project) +Tobias Johansson \ No newline at end of file diff --git a/README.md b/README.md index fa92f94b8..b30b6a90f 100644 --- a/README.md +++ b/README.md @@ -10,8 +10,7 @@ A deployed version of the the web frontend can be seen at [(3)]. Setup ----- The frontend should work directly as provided. -Several settings - including the URL for the routing server and the geocoder server - can be specified in `OSRM.config.js`. -Different tile servers can be specified in `OSRM.Map.js`. +Settings - including URLs of the routing server, geocoder server and tile servers - are specified in `OSRM.config.js`. Note that the URL shortener used for generating route links only works with URLs pointing to the official Project-OSRM website. diff --git a/WebContent/OSRM.config.js b/WebContent/OSRM.config.js index 3405d0b47..79e84d5fd 100644 --- a/WebContent/OSRM.config.js +++ b/WebContent/OSRM.config.js @@ -60,9 +60,14 @@ OSRM.DEFAULTS = { {encoding:"fi", name:"Suomi"}, {encoding:"fr", name:"Français"}, {encoding:"it", name:"Italiano"}, + {encoding:"ja", name:"日本人"}, {encoding:"lv", name:"Latviešu"}, {encoding:"pl", name:"Polski"}, - {encoding:"ru", name:"Русский"} + {encoding:"pt", name:"Portugues"}, + {encoding:"ro", name:"Română"}, + {encoding:"ru", name:"Русский"}, + {encoding:"sv", name:"Svenska"}, + {encoding:"tr", name:"Türkçe"} ], TILE_SERVERS: [ diff --git a/WebContent/base/OSRM.Map.js b/WebContent/base/OSRM.Map.js index c698d5e9a..da093da06 100644 --- a/WebContent/base/OSRM.Map.js +++ b/WebContent/base/OSRM.Map.js @@ -44,6 +44,7 @@ init: function() { tile_servers[i].options.attribution = tile_servers[i].attribution; base_maps[ tile_servers[i].display_name ] = new L.TileLayer( tile_servers[i].url, tile_servers[i].options ); } + L.Util.stamp( base_maps[ tile_servers[i].display_name ] ); // stamp tile servers so that their order is correct in layers control } // setup map diff --git a/WebContent/base/OSRM.Markers.js b/WebContent/base/OSRM.Markers.js index 7bc5d7a3b..548943572 100644 --- a/WebContent/base/OSRM.Markers.js +++ b/WebContent/base/OSRM.Markers.js @@ -21,6 +21,7 @@ or see http://www.gnu.org/licenses/agpl.txt. OSRM.Markers = function() { this.route = new Array(); this.highlight = new OSRM.DragMarker("highlight", {zIndexOffset:-1,draggable:true,icon:OSRM.G.icons['marker-highlight'],dragicon:OSRM.G.icons['marker-highlight-drag']});; + this.hover = new OSRM.Marker("hover", {zIndexOffset:-1,draggable:false,icon:OSRM.G.icons['marker-highlight']});; this.dragger = new OSRM.DragMarker("drag", {draggable:true,icon:OSRM.G.icons['marker-drag'],dragicon:OSRM.G.icons['marker-drag']});; }; OSRM.extend( OSRM.Markers,{ diff --git a/WebContent/base/leaflet/L.LabelMarker.js b/WebContent/base/leaflet/L.LabelMarker.js index c32445fa9..eb3e89a26 100644 --- a/WebContent/base/leaflet/L.LabelMarker.js +++ b/WebContent/base/leaflet/L.LabelMarker.js @@ -38,6 +38,12 @@ L.LabelMarker = L.Marker.extend({ } }, + // add/change marker tooltip + setTitle: function ( title ) { + this.options.title = title; + this._icon.title = title; + }, + // actual icon changing routine _changeIcon: function () { var options = this.options, diff --git a/WebContent/base/osrm/OSRM.Marker.js b/WebContent/base/osrm/OSRM.Marker.js index 6df6ffcfa..6c1501fea 100644 --- a/WebContent/base/osrm/OSRM.Marker.js +++ b/WebContent/base/osrm/OSRM.Marker.js @@ -38,6 +38,14 @@ show: function() { hide: function() { OSRM.G.map.removeLayer(this.marker); this.shown = false; + + // revert highlighted description + if( this.label == "highlight" ) + if( this.description ) { + var desc = document.getElementById("description-"+this.description); + desc && (desc.className = "description-body-item"); + this.description = null; + } }, setPosition: function( position ) { this.position = position; diff --git a/WebContent/localization/OSRM.Locale.de.js b/WebContent/localization/OSRM.Locale.de.js index 1917bfd6d..850f4008b 100644 --- a/WebContent/localization/OSRM.Locale.de.js +++ b/WebContent/localization/OSRM.Locale.de.js @@ -68,7 +68,7 @@ OSRM.Localization["de"] = { // printing "OVERVIEW_MAP": "Übersichtskarte", "NO_ROUTE_SELECTED": "Keine Route ausgewählt", -//routing engines +// routing engines "ENGINE_0": "Auto (schnellste)", // directions "N": "Norden", diff --git a/WebContent/localization/OSRM.Locale.en.js b/WebContent/localization/OSRM.Locale.en.js index 791f2b996..e3363144a 100644 --- a/WebContent/localization/OSRM.Locale.en.js +++ b/WebContent/localization/OSRM.Locale.en.js @@ -130,7 +130,7 @@ OSRM.Localization["en"] = { "

" + "You can even create intermediate markers by dragging them off of the main route! ", // do not translate below this line -"GUI_LEGAL_NOTICE": "Routing by Project OSRM - Geocoder by Nominatim - OSRM hosting by KIT", +"GUI_LEGAL_NOTICE": "Routing by Project OSRM - Geocoder by Nominatim - OSRM hosting by KIT", "GUI_DATA_TIMESTAMP": "data: ", "GUI_VERSION": "gui: ", "QR": "QR" diff --git a/WebContent/localization/OSRM.Locale.es.js b/WebContent/localization/OSRM.Locale.es.js index 46d64409a..e023e1efb 100644 --- a/WebContent/localization/OSRM.Locale.es.js +++ b/WebContent/localization/OSRM.Locale.es.js @@ -103,7 +103,32 @@ OSRM.Localization["es"] = { "DIRECTION_11-8":"En la rotonda, tome la octava salida[ en dirección %s]", "DIRECTION_11-9":"En la rotonda, tome la novena salida[ en dirección %s]", "DIRECTION_11-x":"En la rotonda, tome una de sus muchas salidas [ en dirección %s]", -"DIRECTION_15":"Ha llegado a su destino" +"DIRECTION_15":"Ha llegado a su destino", +// notifications +"NOTIFICATION_MAINTENANCE_HEADER": "Mantenimiento programado", +"NOTIFICATION_MAINTENANCE_BODY": "La web de OSRM está desactivada debido a una interrupción de mantenimiento programado. " + + "Sea paciente mientra se realizan las actualizaciones requeridas. " + + "La web volverá a estar online pronto." + + "

" + + "Mientras, quizá quiera salir y mapear un barrio cercano..." + + "


[OSRM]", +"NOTIFICATION_LOCALIZATION_HEADER": "¿Lo sabía? Puede cambiar el idioma de la web.", +"NOTIFICATION_LOCALIZATION_BODY": "Use el menú desplegable en la esquina superior izquierda para seleccionar su idioma favorito. " + + "

" + + "No desespere si no encuentre el idioma que busca. " + + "Si lo desea, ¡puede ayudar proporcionando traducciones adicionales! " + + "Visite esta página para más detalles.", +"NOTIFICATION_CLICKING_HEADER": "¿Lo sabía? Puede hacer click en el mapa para añadir los marcadores de ruta.", +"NOTIFICATION_CLICKING_BODY": "Puede hacer click en el mapa con el botón izquierdo del ratón para añadir el marcador origen (verde) o el destino (rojo) " + + "si el marcador origen ya existe. " + + "La dirección de la posición seleccionada se mostrará en los campos de texto de la izquierda. " + + "

" + + "Puede borrar un marcador haciendo click de nuevo en él con el botón izquierdo del ratón.", +"NOTIFICATION_DRAGGING_HEADER": "¿Lo sabía? Puede arrastrar los marcadores por el mapa.", +"NOTIFICATION_DRAGGING_BODY": "Puede arrastrar un marcador haciendo clic en él con el botón izquierdo del ratón y manteniéndolo pulsado. " + + "A continuación mueva el ratón por el mapa y la ruta se actualizará instantáneamente. " + + "

" + + "¡Puede incluso crear marcadores intermedios arrastrando un punto de la ruta! " }; // set GUI language on load diff --git a/WebContent/localization/OSRM.Locale.ja.js b/WebContent/localization/OSRM.Locale.ja.js new file mode 100644 index 000000000..9913ddd81 --- /dev/null +++ b/WebContent/localization/OSRM.Locale.ja.js @@ -0,0 +1,111 @@ +/* +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU AFFERO General Public License as published by +the Free Software Foundation; either version 3 of the License, or +any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +or see http://www.gnu.org/licenses/agpl.txt. +*/ + +// OSRM localization +// [Japanese language support] + + +OSRM.Localization["ja"] = { +// own language +"CULTURE": "ja-JP", +"LANGUAGE": "日本人", +// gui +"GUI_START": "開 始", +"GUI_END": "終 了", +"GUI_RESET": "リセット", +"GUI_ZOOM_ON_ROUTE": "ルートにズーム", +"GUI_ZOOM_ON_USER": "ユーザーへのズーム", +"GUI_SEARCH": "表 示", +"GUI_REVERSE": "逆にする", +"GUI_START_TOOLTIP": "出発地を入力", +"GUI_END_TOOLTIP": "目的地を入力", +"GUI_MAIN_WINDOW": "メインウインドウ", +"GUI_ZOOM_IN": "拡大する", +"GUI_ZOOM_OUT": "減らす", +// config +"GUI_CONFIGURATION": "設定", +"GUI_LANGUAGE": "言語", +"GUI_UNITS": "単位", +"GUI_KILOMETERS": "キロメートル", +"GUI_MILES": "マイル", +// mapping +"GUI_MAPPING_TOOLS": "マッピングツール", +"GUI_HIGHLIGHT_UNNAMED_ROADS": "名前の無い道路をハイライト", +"GUI_SHOW_PREVIOUS_ROUTES": "以前のルートを表示", +"OPEN_JOSM": "JOSM", +"OPEN_OSMBUGS": "OSM バグ", +// geocoder +"SEARCH_RESULTS": "検索結果", +"FOUND_X_RESULTS": "%i 件が見つかりました", +"TIMED_OUT": "タイムアウト", +"NO_RESULTS_FOUND": "見つかりませんでした", +"NO_RESULTS_FOUND_SOURCE": "出発地が見つかりませんでした", +"NO_RESULTS_FOUND_TARGET": "目的地見つかりませんでした", +// routing +"ROUTE_DESCRIPTION": "ルートの説明", +"GET_LINK_TO_ROUTE": "リンクを生成", +"GENERATE_LINK_TO_ROUTE": "リンクを作成", +"LINK_TO_ROUTE_TIMEOUT": "利用できません", +"GPX_FILE": "GPX ファイル", +"DISTANCE": "距 離", +"DURATION": "期 間", +"YOUR_ROUTE_IS_BEING_COMPUTED": "ルートを計算しています", +"NO_ROUTE_FOUND": "ルートが見つかりませんでした", +// printing +"OVERVIEW_MAP": "概観図", +"NO_ROUTE_SELECTED": "ルートが選択されていません", +//routing engines +"ENGINE_0": "カー(最速)", +// directionsVergrößern +"N": "北", +"E": "東", +"S": "南", +"W": "西", +"NE": "北東", +"SE": "南東", +"SW": "南西", +"NW": "北西", +// driving directions +// %s: road name +// %d: direction +// [*]: will only be printed when there actually is a road name +"DIRECTION_0":"[%s に]不明な指示", +"DIRECTION_1":"[%s 上を]進む", +"DIRECTION_2":"[%s 上を]右に緩く曲がる", +"DIRECTION_3":"[%s 上を]右に曲がる", +"DIRECTION_4":"[%s 上を]右に鋭く曲がる", +"DIRECTION_5":"[%s 上を]Uターンする", +"DIRECTION_6":"[%s 上を]左に鋭く曲がる", +"DIRECTION_7":"[%s 上を]左に曲がる", +"DIRECTION_8":"[%s 上を]左に緩く曲がる", +"DIRECTION_10":"[%s 上の] %d に向かう", +"DIRECTION_11-1":"[%s 上の]円形交差点に入り、1つ目の出口で出る", +"DIRECTION_11-2":"[%s 上の]円形交差点に入り、2つ目の出口で出る", +"DIRECTION_11-3":"[%s 上の]円形交差点に入り、3つ目の出口で出る", +"DIRECTION_11-4":"[%s 上の]円形交差点に入り、4つ目の出口で出る", +"DIRECTION_11-5":"[%s 上の]円形交差点に入り、5つ目の出口で出る", +"DIRECTION_11-6":"[%s 上の]円形交差点に入り、6つ目の出口で出る", +"DIRECTION_11-7":"[%s 上の]円形交差点に入り、7つ目の出口で出る", +"DIRECTION_11-8":"[%s 上の]円形交差点に入り、8つ目の出口で出る", +"DIRECTION_11-9":"[%s 上の]円形交差点に入り、9つ目の出口で出る", +"DIRECTION_11-x":"[%s 上の]円形交差点に入り、多くの出口のいずれかで出る", +"DIRECTION_15":"目的地に到着しました" +}; + +// set GUI language on load +if( OSRM.DEFAULTS.LANUGAGE_ONDEMAND_RELOADING == true ) + OSRM.Localization.setLanguage("ja"); diff --git a/WebContent/localization/OSRM.Locale.pt.js b/WebContent/localization/OSRM.Locale.pt.js new file mode 100644 index 000000000..61896f2bc --- /dev/null +++ b/WebContent/localization/OSRM.Locale.pt.js @@ -0,0 +1,136 @@ +/* +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU AFFERO General Public License as published by +the Free Software Foundation; either version 3 of the License, or +any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +or see http://www.gnu.org/licenses/agpl.txt. +*/ + +// OSRM localization +// [Portugese language support] + + +OSRM.Localization["pt"] = { +// own language +"CULTURE": "pt-PT", +"LANGUAGE": "Portugues", +// gui +"GUI_START": "Iniciar", +"GUI_END": "Terminar", +"GUI_RESET": "Restabelecer", +"GUI_ZOOM_ON_ROUTE": "Ampliar para Rota", +"GUI_ZOOM_ON_USER": "Ampliar para Utilizador", +"GUI_SEARCH": "Mostrar", +"GUI_REVERSE": "Inverso", +"GUI_START_TOOLTIP": "Indique início", +"GUI_END_TOOLTIP": "Indique destino", +"GUI_MAIN_WINDOW": "Janela principal", +"GUI_ZOOM_IN": "Aumentar", +"GUI_ZOOM_OUT": "Reduzir", +// config +"GUI_CONFIGURATION": "Configuração", +"GUI_LANGUAGE": "Idioma", +"GUI_UNITS": "Unidades", +"GUI_KILOMETERS": "Quilometros", +"GUI_MILES": "Milhas", +// mapping +"GUI_MAPPING_TOOLS": "Ferramentas de Mapear", +"GUI_HIGHLIGHT_UNNAMED_ROADS": "Destaque ruas sem nome", +"GUI_SHOW_PREVIOUS_ROUTES": "Mostrar rotas anteriores", +"OPEN_JOSM": "JOSM", +"OPEN_OSMBUGS": "OSM Bugs", +// geocoder +"SEARCH_RESULTS": "Pesquisar resultados", +"FOUND_X_RESULTS": "encontrados %i resultados", +"TIMED_OUT": "Esgotado o tempo limite", +"NO_RESULTS_FOUND": "Não foram encontrados resultados", +"NO_RESULTS_FOUND_SOURCE": "Não foram encontrados resultados para o início", +"NO_RESULTS_FOUND_TARGET": "Não foram encontrados resultados para o final", +// routing +"ROUTE_DESCRIPTION": "Descrição da rota", +"GET_LINK_TO_ROUTE": "gerar ligação", +"GENERATE_LINK_TO_ROUTE": "à espera de ligação", +"LINK_TO_ROUTE_TIMEOUT": "não disponível", +"GPX_FILE": "Ficheiro GPX", +"DISTANCE": "Distância", +"DURATION": "Duração", +"YOUR_ROUTE_IS_BEING_COMPUTED": "A sua rota está a ser calculada", +"NO_ROUTE_FOUND": "A rota não é possivel", +// printing +"OVERVIEW_MAP": "Mapa de visão global", +"NO_ROUTE_SELECTED": "Sem rota selecionada", +// routing engines +"ENGINE_0": "Carro (mais rápido)", +// directions +"N": "norte", +"E": "este", +"S": "sul", +"W": "oeste", +"NE": "nordeste", +"SE": "sudeste", +"SW": "sudoeste", +"NW": "noroeste", +// driving directions +// %s: road name +// %d: direction +// [*]: will only be printed when there actually is a road name +"DIRECTION_0":"Instrução desconhecida[ para %s]", +"DIRECTION_1":"Continuar[ para %s]", +"DIRECTION_2":"Virar ligeiramente à direita[ para %s]", +"DIRECTION_3":"Virar à direita[ para %s]", +"DIRECTION_4":"Virar à direita apertada[ para %s]", +"DIRECTION_5":"Inversão de marcha[ para %s]", +"DIRECTION_6":"Virar à esquerda apertada[ para %s]", +"DIRECTION_7":"Virar à esquerda[ para %s]", +"DIRECTION_8":"Virar ligeiramente à esquerda[ para %s]", +"DIRECTION_10":"Em direção a %d[ para %s]", +"DIRECTION_11-1":"Entrar na rotunda e sair na primeira saída[ para %s]", +"DIRECTION_11-2":"Entrar na rotunda e sair na segunda saída[ para %s]", +"DIRECTION_11-3":"Entrar na rotunda e sair na terceira saída[ para %s]", +"DIRECTION_11-4":"Entrar na rotunda e sair na quarta saída[ para %s]", +"DIRECTION_11-5":"Entrar na rotunda e sair na quinta saída[ para %s]", +"DIRECTION_11-6":"Entrar na rotunda e sair na sexta saída[ para %s]", +"DIRECTION_11-7":"Entrar na rotunda e sair na sétima saída[ para %s]", +"DIRECTION_11-8":"Entrar na rotunda e sair na oitava saída[ para %s]", +"DIRECTION_11-9":"Entrar na rotunda e sair na nona saída[ para %s]", +"DIRECTION_11-x":"Entrar na rotunda e sair numa das saídas[ para %s]", +"DIRECTION_15":"Você chegou ao seu destino", +// notifications +"NOTIFICATION_MAINTENANCE_HEADER": "Manutenção Programada", +"NOTIFICATION_MAINTENANCE_BODY": "O Site do OSRM é desligado devido a uma manutenção programada. " + + "Por favor, seja paciente enquanto as atualizações necessárias são realizadas. " + + "O site estará de volta online em breve." + + "

" + + "Entretanto poderá sair e mapear um bairro neighborhood perto de si..." + + "


[OSRM]", +"NOTIFICATION_LOCALIZATION_HEADER": "Você sabe? Pode alterar o idioma do ecran de exibição.", +"NOTIFICATION_LOCALIZATION_BODY": "Pode usar o menu suspenso no canto superior esquerdo para selecionar o seu idioma preferido. " + + "

" + + "Não desespere se não consegue encontrar o idioma de sua escolha. " + + "Se quiser, você pode ajudar a fornecer traduções adicionais! " + + "Visite aqui para mais informações.", +"NOTIFICATION_CLICKING_HEADER": "Você sabe? Pode clicar no mapa para definir marcadores de rota.", +"NOTIFICATION_CLICKING_BODY": "Clique no mapa com o botão esquerdo do rato para definir um marcador fonte (verde) ou um marcador de destino (vermelho), " + + "se o marcador de origem já existe. " + + "O endereço do local selecionado será exibido nas caixas à esquerda. " + + "

" + + "Pode excluir um marcador, com um clique sobre ele novamente com o botão esquerdo do rato.", +"NOTIFICATION_DRAGGING_HEADER": "Você sabe? Pode arrastar cada marcador de rota no mapa.", +"NOTIFICATION_DRAGGING_BODY": "Pode arrastar um marcador, com um clique sobre ele com o botão esquerdo do rato e mantendo o botão pressionado. " + + "Então pode mover o marcador ao redor do mapa e a rota será atualizada instantaneamente. " + + "

" + + "Até pode criar marcadores intermédios, arrastando-os para fora da rota principal! " +}; + +// set GUI language on load +if( OSRM.DEFAULTS.LANUGAGE_ONDEMAND_RELOADING == true ) + OSRM.Localization.setLanguage("pt"); diff --git a/WebContent/localization/OSRM.Locale.ro.js b/WebContent/localization/OSRM.Locale.ro.js new file mode 100644 index 000000000..1a0d2f7c1 --- /dev/null +++ b/WebContent/localization/OSRM.Locale.ro.js @@ -0,0 +1,111 @@ +/* +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU AFFERO General Public License as published by +the Free Software Foundation; either version 3 of the License, or +any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +or see http://www.gnu.org/licenses/agpl.txt. +*/ + +// OSRM localization +// [English language support] + + +OSRM.Localization["ro"] = { +// own language +"CULTURE": "ro-RO", +"LANGUAGE": "Română", +// gui +"GUI_START": "începe", +"GUI_END": "țintă", +"GUI_RESET": "Resetare", +"GUI_ZOOM_ON_ROUTE": "Zoom pe ruta", +"GUI_ZOOM_ON_USER": "Zoom pe utilizator", +"GUI_SEARCH": "Arata", +"GUI_REVERSE": "Inverseaza", +"GUI_START_TOOLTIP": "Introduceti punctul de pornire", +"GUI_END_TOOLTIP": "Introduceti destinatia", +"GUI_MAIN_WINDOW": "Fereastra principală", +"GUI_ZOOM_IN": "zoom in", +"GUI_ZOOM_OUT": "zoom out", +// config +"GUI_CONFIGURATION": "Configurare", +"GUI_LANGUAGE": "Limba", +"GUI_UNITS": "Unitati", +"GUI_KILOMETERS": "Kilometri", +"GUI_MILES": "Mile", +// mapping +"GUI_MAPPING_TOOLS": "Instrumente de cartografiere", +"GUI_HIGHLIGHT_UNNAMED_ROADS": "Evidentiaza strazile fara nume", +"GUI_SHOW_PREVIOUS_ROUTES": "Arata trasee anterioare", +"OPEN_JOSM": "JOSM", +"OPEN_OSMBUGS": "OSM Bugs", +// geocoder +"SEARCH_RESULTS": "Rezultatele cautarii", +"FOUND_X_RESULTS": "Rezultatele gasite", +"TIMED_OUT": "Timpul a expirat", +"NO_RESULTS_FOUND": "Nu s-au gasit rezultate", +"NO_RESULTS_FOUND_SOURCE": "Nu s-au gasit rezultate pentru punctul de plecare", +"NO_RESULTS_FOUND_TARGET": "Nu s-au gasit rezultate pentru punctul de sosire", +// routing +"ROUTE_DESCRIPTION": "Descrierea rutei", +"GET_LINK_TO_ROUTE": "Genereaza link", +"GENERATE_LINK_TO_ROUTE": "in asteptare pentru link", +"LINK_TO_ROUTE_TIMEOUT": "nu este disponibil", +"GPX_FILE": "GPX File", +"DISTANCE": "Distanta", +"DURATION": "Durata", +"YOUR_ROUTE_IS_BEING_COMPUTED": "Ruta dumneavoastra se calculeaza", +"NO_ROUTE_FOUND": "Nicio ruta nu este posibila", +// printing +"OVERVIEW_MAP": "Overview Map", +"NO_ROUTE_SELECTED": "Nu este selectata nicio ruta", +// routing engines +"ENGINE_0": "Masina (cel mai rapid)", +// directions +"N": "nord", +"E": "est", +"S": "sud", +"W": "vest", +"NE": "nordest", +"SE": "sudest", +"SW": "sudvest", +"NW": "nordvest", +// driving directions +// %s: road name +// %d: direction +// [*]: will only be printed when there actually is a road name +"DIRECTION_0":" Instructiuni necunoscute[ spre %s]", +"DIRECTION_1":"Continuati[ spre %s]", +"DIRECTION_2":"Faceti usor dreapta[ spre %s]", +"DIRECTION_3":"Faceti dreapta[ spre %s]", +"DIRECTION_4":"Faceti brusc dreapta[ spre %s]", +"DIRECTION_5":"Intoarcere in U[ spre %s]", +"DIRECTION_6":"Faceti brusc stanga[ spre %s]", +"DIRECTION_7":"Faceti stanga[ spre %s]", +"DIRECTION_8":"Faceti usor stanga[ spre %s]", +"DIRECTION_10":"Indreptati-va %d[ spre %s]", +"DIRECTION_11-1":"Intrati in sensul giratoriu si alegeti prima iesire[ spre %s]", +"DIRECTION_11-2":"Intrati in sensul giratoriu si alegeti a doua iesire[ spre %s]", +"DIRECTION_11-3":"Intrati in sensul giratoriu si alegeti a treia iesire[ spre %s]", +"DIRECTION_11-4":"Intrati in sensul giratoriu si alegeti a patra iesire[ spre %s]", +"DIRECTION_11-5":"Intrati in sensul giratoriu si alegeti a cincea iesire[ spre %s]", +"DIRECTION_11-6":"Intrati in sensul giratoriu si alegeti a sasea iesire[ spre %s]", +"DIRECTION_11-7":"Intrati in sensul giratoriu si alegeti a saptea iesire[ spre %s]", +"DIRECTION_11-8":"Intrati in sensul giratoriu si alegeti a opta iesire[ spre %s]", +"DIRECTION_11-9":"Intrati in sensul giratoriu si alegeti a noua iesire[ spre %s]", +"DIRECTION_11-x":"Intrati in sensul giratoriu si alegeti una din multele iesiri[ spre %s]", +"DIRECTION_15":"Ati ajuns la destinatie" +}; + +// set GUI language on load +if( OSRM.DEFAULTS.LANUGAGE_ONDEMAND_RELOADING==true ) + OSRM.Localization.setLanguage("ro"); diff --git a/WebContent/localization/OSRM.Locale.sv.js b/WebContent/localization/OSRM.Locale.sv.js new file mode 100644 index 000000000..368a4edcb --- /dev/null +++ b/WebContent/localization/OSRM.Locale.sv.js @@ -0,0 +1,136 @@ +/* +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU AFFERO General Public License as published by +the Free Software Foundation; either version 3 of the License, or +any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +or see http://www.gnu.org/licenses/agpl.txt. +*/ + +// OSRM localization +// [Swedish language support] + + +OSRM.Localization["sv"] = { +// own language +"CULTURE": "sv-SE", +"LANGUAGE": "Svenska", +// gui +"GUI_START": "Start", +"GUI_END": "Mål", +"GUI_RESET": "Nollställ", +"GUI_ZOOM_ON_ROUTE": "Zooma in rutt", +"GUI_ZOOM_ON_USER": "Zooma in användare", +"GUI_SEARCH": "Sök", +"GUI_REVERSE": "Omvänt", +"GUI_START_TOOLTIP": "Lägg in start", +"GUI_END_TOOLTIP": "Lägg in destination", +"GUI_MAIN_WINDOW": "Huvudfönstret", +"GUI_ZOOM_IN": "Zooma in", +"GUI_ZOOM_OUT": "Zooma ut", +// config +"GUI_CONFIGURATION": "Konfiguration", +"GUI_LANGUAGE": "Språk", +"GUI_UNITS": "Enheter", +"GUI_KILOMETERS": "Kilometer", +"GUI_MILES": "Miles", +// mapping +"GUI_MAPPING_TOOLS": "Kortläggnings verktyg", +"GUI_HIGHLIGHT_UNNAMED_ROADS": "Framhäv icke namngedda vägar", +"GUI_SHOW_PREVIOUS_ROUTES": "Visa tidigare rutter", +"OPEN_JOSM": "JOSM", +"OPEN_OSMBUGS": "OSM Bugs", +// geocoder +"SEARCH_RESULTS": "Sökresultat", +"FOUND_X_RESULTS": "fann %i resultat", +"TIMED_OUT": "Inget svar", +"NO_RESULTS_FOUND": "Inga resultat", +"NO_RESULTS_FOUND_SOURCE": "Inga resultat för start", +"NO_RESULTS_FOUND_TARGET": "Inga resultat för destination", +// routing +"ROUTE_DESCRIPTION": "Ruttbeskrivelse", +"GET_LINK_TO_ROUTE": "Skapa länk", +"GENERATE_LINK_TO_ROUTE": "väntar på länk", +"LINK_TO_ROUTE_TIMEOUT": "icke tillgänglig", +"GPX_FILE": "GPX Fil", +"DISTANCE": "Distans", +"DURATION": "Tid", +"YOUR_ROUTE_IS_BEING_COMPUTED": "Din rutt beräknas", +"NO_ROUTE_FOUND": "Ingen möjlig rutt funnen", +// printing +"OVERVIEW_MAP": "Översiktskarta", +"NO_ROUTE_SELECTED": "Ingen rutt vald", +// routing engines +"ENGINE_0": "Bil (snabbaste)", +// directions +"N": "nord", +"E": "öst", +"S": "syd", +"W": "väst", +"NE": "nordost", +"SE": "sydost", +"SW": "sydväst", +"NW": "nordväst", +// driving directions +// %s: road name +// %d: direction +// [*]: will only be printed when there actually is a road name +"DIRECTION_0":"Okänd instruktion[ på %s]", +"DIRECTION_1":"Fortsätt[ på %s]", +"DIRECTION_2":"Sväng svagt till höger[ in på %s]", +"DIRECTION_3":"Sväng till höger[ in på %s]", +"DIRECTION_4":"Sväng skarpt till höger[ in på %s]", +"DIRECTION_5":"U-sväng[ på %s]", +"DIRECTION_6":"Sväng skarpt till vänster[ in på %s]", +"DIRECTION_7":"Sväng till vänster[ in på %s]", +"DIRECTION_8":"Sväng svagt till vänster[ in på %s]", +"DIRECTION_10":"Kör mot %d[ på %s]", +"DIRECTION_11-1":"Kör in i rondellen och tag första avfarten[ in på %s]", +"DIRECTION_11-2":"Kör in i rondellen och tag andra avfarten[ in på %s]", +"DIRECTION_11-3":"Kör in i rondellen och tag tredje avfarten[ in på %s]", +"DIRECTION_11-4":"Kör in i rondellen och tag fjärde avfarten[ in på %s]", +"DIRECTION_11-5":"Kör in i rondellen och tag femte avfarten[ in på %s]", +"DIRECTION_11-6":"Kör in i rondellen och tag sjätte avfarten[ in på %s]", +"DIRECTION_11-7":"Kör in i rondellen och tag sjunde avfarten[ in på %s]", +"DIRECTION_11-8":"Kör in i rondellen och tag åttonde avfarten[ in på %s]", +"DIRECTION_11-9":"Kör in i rondellen och tag nionde avfarten[ in på %s]", +"DIRECTION_11-x":"Kör in i rondellen och tag en av de allt för många avfarterna[ in på %s]", +"DIRECTION_15":"Du är framme", +// notifications +"NOTIFICATION_MAINTENANCE_HEADER": "Schemalagt underhåll", +"NOTIFICATION_MAINTENANCE_BODY": "OSRM Websida ligger nere pga. schemalagt underhåll. " + + "Var god djöj till de nödvändiga uppdateringarna är slutförda. " + + "Sidan kommer vara upp snart." + + "

" + + "Under tiden kanske du vill kartlägga ditt närområde..." + + "


[OSRM]", +"NOTIFICATION_LOCALIZATION_HEADER": "Visste du att? Du kan ändra språk.", +"NOTIFICATION_LOCALIZATION_BODY": "Du kan använda menyn uppe till vänster för att välja ditt språk. " + + "

" + + "Frukta inte, om ditt språk inte finns. " + + "Du kan då hjälpa till och översätta OSRM till ditt språk! " + + "Visit here for more information.", +"NOTIFICATION_CLICKING_HEADER": "Visste du att? Du kan klicka på kartan för att lägga till ruttmarkörer.", +"NOTIFICATION_CLICKING_BODY": "Du kan klicka på kartan med vänster musknapp för att sätta startpunkt (grön) eller målpunkt (röd), " + + "om det redan finns en startpunkt. " + + "Addressen för den tillagda punkten kommer finnas i sökfälter till vänster. " + + "

" + + "Du kan ta bort en markör genom att återigen klicka på den.", +"NOTIFICATION_DRAGGING_HEADER": "Visste du att? Du kan dra i varje ruttmarkör på kartan.", +"NOTIFICATION_DRAGGING_BODY": "Du kan dra i varje ruttmarkör genom att klicka och hålla nere vänster musknapp på den och sedan dra densamma. " + + "Då kan du flytta ruttmarkören på kartan och rutten uppdateras automatiskt. " + + "

" + + "Du kan även skappa mellanpunktsmarkörer genom att dra någonstans på rutten! " +}; + +// set GUI language on load +if( OSRM.DEFAULTS.LANUGAGE_ONDEMAND_RELOADING == true ) + OSRM.Localization.setLanguage("sv"); diff --git a/WebContent/localization/OSRM.Locale.tr.js b/WebContent/localization/OSRM.Locale.tr.js new file mode 100644 index 000000000..169f1e208 --- /dev/null +++ b/WebContent/localization/OSRM.Locale.tr.js @@ -0,0 +1,136 @@ +/* +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU AFFERO General Public License as published by +the Free Software Foundation; either version 3 of the License, or +any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +or see http://www.gnu.org/licenses/agpl.txt. +*/ + +// OSRM localization +// [Turkish language support] + + +OSRM.Localization["tr"] = { +// own language +"CULTURE": "tr-TR", +"LANGUAGE": "Türkçe", +// gui +"GUI_START": "Başlangıç", +"GUI_END": "Bitiş", +"GUI_RESET": "Reset", +"GUI_ZOOM_ON_ROUTE": "Güzergah Üzerinde Yakınlaştırma", +"GUI_ZOOM_ON_USER": "Kullanıcının Yakınlaştırma", +"GUI_SEARCH": "Göstermek", +"GUI_REVERSE": "Çevir", +"GUI_START_TOOLTIP": "Nereden", +"GUI_END_TOOLTIP": "Nereye", +"GUI_MAIN_WINDOW": "Ana Pencere", +"GUI_ZOOM_IN": "büyütmek", +"GUI_ZOOM_OUT": "azaltmak", +// config +"GUI_CONFIGURATION": "Konfigürasyon", +"GUI_LANGUAGE": "Dil", +"GUI_UNITS": "Units", +"GUI_KILOMETERS": "Kilometre", +"GUI_MILES": "Mil", +// mapping +"GUI_MAPPING_TOOLS": "Harita Araçları", +"GUI_HIGHLIGHT_UNNAMED_ROADS": "Önemli İsimlendirilmemiş Sokaklar", +"GUI_SHOW_PREVIOUS_ROUTES": "Önceki Rotaları Göster", +"OPEN_JOSM": "JOSM", +"OPEN_OSMBUGS": "OSM Bugs", +// geocoder +"SEARCH_RESULTS": "Sonuçları Göster", +"FOUND_X_RESULTS": "found %i results", +"TIMED_OUT": "Timed Out", +"NO_RESULTS_FOUND": "Hiçbir Sonuç Bulunamadı", +"NO_RESULTS_FOUND_SOURCE": "Başlangıç için hiç sonuç bulunmadı", +"NO_RESULTS_FOUND_TARGET": "Bitiş için hiç sonuç bulunamadı", +// routing +"ROUTE_DESCRIPTION": "Rota Açıklaması", +"GET_LINK_TO_ROUTE": "Link Oluştur", +"GENERATE_LINK_TO_ROUTE": "Link bekleniyor", +"LINK_TO_ROUTE_TIMEOUT": "uygun değil", +"GPX_FILE": "GPX Dosyası", +"DISTANCE": "Mesafe", +"DURATION": "Süre", +"YOUR_ROUTE_IS_BEING_COMPUTED": "Rotanız Hesaplandı", +"NO_ROUTE_FOUND": "Hiç uygun rota yok", +// printing +"OVERVIEW_MAP": "Haritaya genel bakış", +"NO_ROUTE_SELECTED": "Hiç rota seçilmedi", +// routing engines +"ENGINE_0": "Araba (en hızlı)", +// directions +"N": "kuzey", +"E": "doğu", +"S": "güney", +"W": "batı", +"NE": "kuzeydoğu", +"SE": "güneydoğu", +"SW": "güneybatı", +"NW": "kuzeybatı", +// driving directions +// %s: road name +// %d: direction +// [*]: will only be printed when there actually is a road name +"DIRECTION_0":"Bilinmeyen açıklama[ onto %s]", +"DIRECTION_1":"Devam[ onto %s]", +"DIRECTION_2":"Hafif sağa dönün[ onto %s]", +"DIRECTION_3":"Sağa dönün[ onto %s]", +"DIRECTION_4":"Sağa keskin dönün[ onto %s]", +"DIRECTION_5":"U-Dönüşü[ onto %s]", +"DIRECTION_6":"Sola keskin dönün[ onto %s]", +"DIRECTION_7":"Sola dönün[ onto %s]", +"DIRECTION_8":"Hafif sola dönün[ onto %s]", +"DIRECTION_10":"Yön %d[ onto %s]", +"DIRECTION_11-1":"Kavşağa girin ve ilk çıkıştan çıkın[ onto %s]", +"DIRECTION_11-2":"Kavşağa girin ve ikinci çıkıştan çıkın[ onto %s]", +"DIRECTION_11-3":"Kavşağa girin ve üçüncü çıkıştan çıkın[ onto %s]", +"DIRECTION_11-4":"Kavşağa girin ve dördüncü çıkıştan çıkın[ onto %s]", +"DIRECTION_11-5":"Kavşağa girin ve beşinci çıkıştan çıkın[ onto %s]", +"DIRECTION_11-6":"Kavşağa girin ve altıncı çıkıştan çıkın[ onto %s]", +"DIRECTION_11-7":"Kavşağa girin ve yedinci çıkıştan çıkın[ onto %s]", +"DIRECTION_11-8":"Kavşağa girin ve sekizinci çıkıştan çıkın[ onto %s]", +"DIRECTION_11-9":"Kavşağa girin ve dokuzuncu çıkıştan çıkın[ onto %s]", +"DIRECTION_11-x":"Kavşağa girin ve birçok çıkışın birinden çıkın[ onto %s]", +"DIRECTION_15":"Hedefinize ulaştınız", +// notifications +"NOTIFICATION_MAINTENANCE_HEADER": "Programlı Bakım", +"NOTIFICATION_MAINTENANCE_BODY": "OSRM Web sayfası planlı bakımla yazılmıştır. " + + "Lütfen güncellenmeler yapılırken sabırlı olun. " + + "Site kısa bir süre sonra çevrimiçi olacaktır." + + "

" + + "Aynı zamanda dışarıya çıkıp komşunuzu haritalamayı isteyebilirsiniz..." + + "


[OSRM]", +"NOTIFICATION_LOCALIZATION_HEADER": "Biliyor muydunuz? Dil görünümünü değiştirebilirsiniz.", +"NOTIFICATION_LOCALIZATION_BODY": "Favori dilinizi seçmek için üst sol köşedeki aşağı açılna menüye tıklayabilirsiniz. " + + "

" + + "İstediğiniz dili bulamazsanız umutsuzluğa düşmeyin. " + + "Eğer isterseniz, fazladan çeviriler elde etmek için yardım edebilirsiniz! " + + "Ziyaret edin here daha fazla bilgi için.", +"NOTIFICATION_CLICKING_HEADER": "Biliyor muydunuz? Rota işaretleyicilerini ayarlamak için haritaya tıklayabilirsiniz.", +"NOTIFICATION_CLICKING_BODY": "İşaretleyici kaynağını (yeşil) yada hedef işaretleyici (kırmızı)ayarlamak için farenin sol tarafıyla haritanın üzerine tıklayabilirsiniz. " + + "Eğer kaynak işaretleyici zaten varsa. " + + "Seçilen bölgenin adresi sola doğru kutularda gözükecek. " + + "

" + + "Farenin sol tarafına tıklayarak işaretleyiciyi silebilirsiniz.", +"NOTIFICATION_DRAGGING_HEADER": "Biliyor muydunuz? Rota işaretleyicisini harita üzerinde sürükleyebilirsiniz.", +"NOTIFICATION_DRAGGING_BODY": "İşaretleyiciyi farenin sol tarafına tıklayarak veya basılı tutarak sürükleyebilirsiniz. " + + "Sonra işaretleyiciyi haritanın çevresinde hareket ettirebilirsiniz ve rota kendini otomatik olarak yeniler. " + + "

" + + "Asıl rotalarına sürükleyerek orta dereceli bir işaretleyici oluşturabilirsiniz ! " +}; + +// set GUI language on load +if( OSRM.DEFAULTS.LANUGAGE_ONDEMAND_RELOADING==true ) + OSRM.Localization.setLanguage("tr"); diff --git a/WebContent/main.css b/WebContent/main.css index 51569cbd8..c25deda89 100644 --- a/WebContent/main.css +++ b/WebContent/main.css @@ -393,11 +393,16 @@ html, body .description-body-item { cursor:pointer; - color:#000000 + color:#000000; } .description-body-item:hover { - color:#ff0000 + color:#ff0000; +} +.description-body-item-selected +{ + cursor:pointer; + color:#ff00ff; } /* ------------------------------------------------------------------------ */ diff --git a/WebContent/routing/OSRM.RoutingAlternatives.js b/WebContent/routing/OSRM.RoutingAlternatives.js index 392f07404..e0c77dae6 100644 --- a/WebContent/routing/OSRM.RoutingAlternatives.js +++ b/WebContent/routing/OSRM.RoutingAlternatives.js @@ -37,9 +37,12 @@ init: function() { prepare: function(response) { // move best route to alternative array var the_response = OSRM.G.response; + the_response.route_name = the_response.route_name || []; // delete when fully implemented in routing engine + the_response.alternative_names = the_response.alternative_names || [ [] ]; // delete when fully implemented in routing engine the_response.alternative_geometries.unshift( response.route_geometry ); the_response.alternative_instructions.unshift( response.route_instructions ); the_response.alternative_summaries.unshift( response.route_summary ); + the_response.alternative_names.unshift( response.route_name ); // update basic information OSRM.G.alternative_count = response.alternative_geometries.length; @@ -49,7 +52,8 @@ prepare: function(response) { // switch data the_response.route_geometry = the_response.alternative_geometries[OSRM.G.active_alternative]; the_response.route_instructions = the_response.alternative_instructions[OSRM.G.active_alternative]; - the_response.route_summary = the_response.alternative_summaries[OSRM.G.active_alternative]; + the_response.route_summary = the_response.alternative_summaries[OSRM.G.active_alternative]; + the_response.route_name = the_response.alternative_names[OSRM.G.active_alternative]; }, // switch active alternative and redraw buttons accordingly @@ -73,7 +77,10 @@ show: function() { for(var i=0, size=OSRM.G.alternative_count; i'+buttons[i].label+'' + data; } @@ -104,11 +111,13 @@ _click: function(button_id) { the_response.route_geometry = the_response.alternative_geometries[button_id]; the_response.route_instructions = the_response.alternative_instructions[button_id]; the_response.route_summary = the_response.alternative_summaries[button_id]; + the_response.route_name = the_response.alternative_names[button_id]; // redraw route & data OSRM.RoutingGeometry.show(the_response); OSRM.RoutingNoNames.show(the_response); OSRM.RoutingDescription.show(the_response); + OSRM.G.markers.highlight.hide(); }, _mouseover: function(button_id) { if( OSRM.G.active_alternative == button_id ) diff --git a/WebContent/routing/OSRM.RoutingDescription.js b/WebContent/routing/OSRM.RoutingDescription.js index afc1ad516..d56b50845 100644 --- a/WebContent/routing/OSRM.RoutingDescription.js +++ b/WebContent/routing/OSRM.RoutingDescription.js @@ -35,10 +35,21 @@ uninit: function() { }, // route description events -onClickRouteDescription: function(lat, lng) { +onMouseOverRouteDescription: function(lat, lng) { + OSRM.G.markers.hover.setPosition( new L.LatLng(lat, lng) ); + OSRM.G.markers.hover.show(); + +}, +onMouseOutRouteDescription: function(lat, lng) { + OSRM.G.markers.hover.hide(); +}, +onClickRouteDescription: function(lat, lng, desc) { OSRM.G.markers.highlight.setPosition( new L.LatLng(lat, lng) ); OSRM.G.markers.highlight.show(); OSRM.G.markers.highlight.centerView(OSRM.DEFAULTS.HIGHLIGHT_ZOOM_LEVEL); + + OSRM.G.markers.highlight.description = desc; + document.getElementById("description-"+desc).className = "description-body-item description-body-item-selected"; }, onClickCreateShortcut: function(src){ src += '&z='+ OSRM.G.map.getZoom() + '¢er=' + OSRM.G.map.getCenter().lat.toFixed(6) + ',' + OSRM.G.map.getCenter().lng.toFixed(6); @@ -86,6 +97,12 @@ show: function(response) { // create GPX link var gpx_link = '['+OSRM.loc("GPX_FILE")+']'; + + // check highlight marker to get id of corresponding description + // [works as changing language or metric does not remove the highlight marker!] + var selected_description = null; + if( OSRM.G.markers.highlight.isShown() ) + selected_description = OSRM.G.markers.highlight.description; // create route description var positions = OSRM.G.route.getPositions(); @@ -104,7 +121,10 @@ show: function(response) { body += ''; var pos = positions[response.route_instructions[i][3]]; - body += '
'; + body += '
'; // build route description if( response.route_instructions[i][1] != "" )