Merge remote-tracking branch 'origin/develop'

This commit is contained in:
DennisSchiefer 2012-09-18 12:01:37 +01:00
commit c3288528bc
18 changed files with 727 additions and 13 deletions

View File

@ -16,4 +16,9 @@ Juan Luis Rodriguez Ponce
Lauris Bukšis-Haberkorns
Barboska
miszka999
Konstantin Delchev
Konstantin Delchev
Fumito Mizuno
Necdet Varoglu (OSM-Comenius Project)
Madalina Ionescu (OSM-Comenius Project)
Luis Costa (OSM-Comenius Project)
Tobias Johansson

View File

@ -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.

View File

@ -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: [

View File

@ -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

View File

@ -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,{

View File

@ -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,

View File

@ -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;

View File

@ -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",

View File

@ -130,7 +130,7 @@ OSRM.Localization["en"] = {
"<br/><br/>" +
"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 <a href='http://project-osrm.org/'>Project OSRM</a> - Geocoder by <a href='http://wiki.openstreetmap.org/wiki/Nominatim/'>Nominatim</a> - OSRM hosting by <a href='http://algo2.iti.kit.edu/'>KIT</a>",
"GUI_LEGAL_NOTICE": "Routing by <a href='http://project-osrm.org/'>Project OSRM</a> - Geocoder by <a href='http://wiki.openstreetmap.org/wiki/Nominatim'>Nominatim</a> - OSRM hosting by <a href='http://algo2.iti.kit.edu/'>KIT</a>",
"GUI_DATA_TIMESTAMP": "data: ",
"GUI_VERSION": "gui: ",
"QR": "QR"

View File

@ -103,7 +103,32 @@ OSRM.Localization["es"] = {
"DIRECTION_11-8":"En la rotonda, tome la octava salida[ en dirección <b>%s</b>]",
"DIRECTION_11-9":"En la rotonda, tome la novena salida[ en dirección <b>%s</b>]",
"DIRECTION_11-x":"En la rotonda, tome una de sus muchas salidas [ en dirección <b>%s</b>]",
"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." +
"<br/><br/>" +
"Mientras, quizá quiera salir y mapear un barrio cercano..." +
"<br/><br/><br/>[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. " +
"<br/><br/>" +
"No desespere si no encuentre el idioma que busca. " +
"Si lo desea, ¡puede ayudar proporcionando traducciones adicionales! " +
"Visite <a href='https://github.com/DennisSchiefer/Project-OSRM-Web'>esta página</a> 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. " +
"<br/><br/>" +
"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. " +
"<br/><br/>" +
"¡Puede incluso crear marcadores intermedios arrastrando un punto de la ruta! "
};
// set GUI language on load

View File

@ -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": "開&nbsp;始",
"GUI_END": "終&nbsp;了",
"GUI_RESET": "リセット",
"GUI_ZOOM_ON_ROUTE": "ルートにズーム",
"GUI_ZOOM_ON_USER": "ユーザーへのズーム",
"GUI_SEARCH": "表&nbsp;示",
"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": "距&nbsp;離",
"DURATION": "期&nbsp;間",
"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":"[<b>%s</b> に]不明な指示",
"DIRECTION_1":"[<b>%s</b> 上を]進む",
"DIRECTION_2":"[<b>%s</b> 上を]右に緩く曲がる",
"DIRECTION_3":"[<b>%s</b> 上を]右に曲がる",
"DIRECTION_4":"[<b>%s</b> 上を]右に鋭く曲がる",
"DIRECTION_5":"[<b>%s</b> 上を]Uターンする",
"DIRECTION_6":"[<b>%s</b> 上を]左に鋭く曲がる",
"DIRECTION_7":"[<b>%s</b> 上を]左に曲がる",
"DIRECTION_8":"[<b>%s</b> 上を]左に緩く曲がる",
"DIRECTION_10":"[<b>%s</b> 上の] <b>%d</b> に向かう",
"DIRECTION_11-1":"[<b>%s</b> 上の]円形交差点に入り、1つ目の出口で出る",
"DIRECTION_11-2":"[<b>%s</b> 上の]円形交差点に入り、2つ目の出口で出る",
"DIRECTION_11-3":"[<b>%s</b> 上の]円形交差点に入り、3つ目の出口で出る",
"DIRECTION_11-4":"[<b>%s</b> 上の]円形交差点に入り、4つ目の出口で出る",
"DIRECTION_11-5":"[<b>%s</b> 上の]円形交差点に入り、5つ目の出口で出る",
"DIRECTION_11-6":"[<b>%s</b> 上の]円形交差点に入り、6つ目の出口で出る",
"DIRECTION_11-7":"[<b>%s</b> 上の]円形交差点に入り、7つ目の出口で出る",
"DIRECTION_11-8":"[<b>%s</b> 上の]円形交差点に入り、8つ目の出口で出る",
"DIRECTION_11-9":"[<b>%s</b> 上の]円形交差点に入り、9つ目の出口で出る",
"DIRECTION_11-x":"[<b>%s</b> 上の]円形交差点に入り、多くの出口のいずれかで出る",
"DIRECTION_15":"目的地に到着しました"
};
// set GUI language on load
if( OSRM.DEFAULTS.LANUGAGE_ONDEMAND_RELOADING == true )
OSRM.Localization.setLanguage("ja");

View File

@ -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 <b>%s</b>]",
"DIRECTION_1":"Continuar[ para <b>%s</b>]",
"DIRECTION_2":"Virar ligeiramente à direita[ para <b>%s</b>]",
"DIRECTION_3":"Virar à direita[ para <b>%s</b>]",
"DIRECTION_4":"Virar à direita apertada[ para <b>%s</b>]",
"DIRECTION_5":"Inversão de marcha[ para <b>%s</b>]",
"DIRECTION_6":"Virar à esquerda apertada[ para <b>%s</b>]",
"DIRECTION_7":"Virar à esquerda[ para <b>%s</b>]",
"DIRECTION_8":"Virar ligeiramente à esquerda[ para <b>%s</b>]",
"DIRECTION_10":"Em direção a <b>%d</b>[ para <b>%s</b>]",
"DIRECTION_11-1":"Entrar na rotunda e sair na primeira saída[ para <b>%s</b>]",
"DIRECTION_11-2":"Entrar na rotunda e sair na segunda saída[ para <b>%s</b>]",
"DIRECTION_11-3":"Entrar na rotunda e sair na terceira saída[ para <b>%s</b>]",
"DIRECTION_11-4":"Entrar na rotunda e sair na quarta saída[ para <b>%s</b>]",
"DIRECTION_11-5":"Entrar na rotunda e sair na quinta saída[ para <b>%s</b>]",
"DIRECTION_11-6":"Entrar na rotunda e sair na sexta saída[ para <b>%s</b>]",
"DIRECTION_11-7":"Entrar na rotunda e sair na sétima saída[ para <b>%s</b>]",
"DIRECTION_11-8":"Entrar na rotunda e sair na oitava saída[ para <b>%s</b>]",
"DIRECTION_11-9":"Entrar na rotunda e sair na nona saída[ para <b>%s</b>]",
"DIRECTION_11-x":"Entrar na rotunda e sair numa das saídas[ para <b>%s</b>]",
"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." +
"<br/><br/>" +
"Entretanto poderá sair e mapear um bairro neighborhood perto de si..." +
"<br/><br/><br/>[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. " +
"<br/><br/>" +
"Não desespere se não consegue encontrar o idioma de sua escolha. " +
"Se quiser, você pode ajudar a fornecer traduções adicionais! " +
"Visite <a href='https://github.com/DennisSchiefer/Project-OSRM-Web'>aqui</a> 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. " +
"<br/><br/>" +
"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. " +
"<br/><br/>" +
"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");

View File

@ -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 <b>%s</b>]",
"DIRECTION_1":"Continuati[ spre <b>%s</b>]",
"DIRECTION_2":"Faceti usor dreapta[ spre <b>%s</b>]",
"DIRECTION_3":"Faceti dreapta[ spre <b>%s</b>]",
"DIRECTION_4":"Faceti brusc dreapta[ spre <b>%s</b>]",
"DIRECTION_5":"Intoarcere in U[ spre <b>%s</b>]",
"DIRECTION_6":"Faceti brusc stanga[ spre <b>%s</b>]",
"DIRECTION_7":"Faceti stanga[ spre <b>%s</b>]",
"DIRECTION_8":"Faceti usor stanga[ spre <b>%s</b>]",
"DIRECTION_10":"Indreptati-va <b>%d</b>[ spre <b>%s</b>]",
"DIRECTION_11-1":"Intrati in sensul giratoriu si alegeti prima iesire[ spre <b>%s</b>]",
"DIRECTION_11-2":"Intrati in sensul giratoriu si alegeti a doua iesire[ spre <b>%s</b>]",
"DIRECTION_11-3":"Intrati in sensul giratoriu si alegeti a treia iesire[ spre <b>%s</b>]",
"DIRECTION_11-4":"Intrati in sensul giratoriu si alegeti a patra iesire[ spre <b>%s</b>]",
"DIRECTION_11-5":"Intrati in sensul giratoriu si alegeti a cincea iesire[ spre <b>%s</b>]",
"DIRECTION_11-6":"Intrati in sensul giratoriu si alegeti a sasea iesire[ spre <b>%s</b>]",
"DIRECTION_11-7":"Intrati in sensul giratoriu si alegeti a saptea iesire[ spre <b>%s</b>]",
"DIRECTION_11-8":"Intrati in sensul giratoriu si alegeti a opta iesire[ spre <b>%s</b>]",
"DIRECTION_11-9":"Intrati in sensul giratoriu si alegeti a noua iesire[ spre <b>%s</b>]",
"DIRECTION_11-x":"Intrati in sensul giratoriu si alegeti una din multele iesiri[ spre <b>%s</b>]",
"DIRECTION_15":"Ati ajuns la destinatie"
};
// set GUI language on load
if( OSRM.DEFAULTS.LANUGAGE_ONDEMAND_RELOADING==true )
OSRM.Localization.setLanguage("ro");

View File

@ -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å <b>%s</b>]",
"DIRECTION_1":"Fortsätt[ på <b>%s</b>]",
"DIRECTION_2":"Sväng svagt till höger[ in på <b>%s</b>]",
"DIRECTION_3":"Sväng till höger[ in på <b>%s</b>]",
"DIRECTION_4":"Sväng skarpt till höger[ in på <b>%s</b>]",
"DIRECTION_5":"U-sväng[ på <b>%s</b>]",
"DIRECTION_6":"Sväng skarpt till vänster[ in på <b>%s</b>]",
"DIRECTION_7":"Sväng till vänster[ in på <b>%s</b>]",
"DIRECTION_8":"Sväng svagt till vänster[ in på <b>%s</b>]",
"DIRECTION_10":"Kör mot <b>%d</b>[ på <b>%s</b>]",
"DIRECTION_11-1":"Kör in i rondellen och tag första avfarten[ in på <b>%s</b>]",
"DIRECTION_11-2":"Kör in i rondellen och tag andra avfarten[ in på <b>%s</b>]",
"DIRECTION_11-3":"Kör in i rondellen och tag tredje avfarten[ in på <b>%s</b>]",
"DIRECTION_11-4":"Kör in i rondellen och tag fjärde avfarten[ in på <b>%s</b>]",
"DIRECTION_11-5":"Kör in i rondellen och tag femte avfarten[ in på <b>%s</b>]",
"DIRECTION_11-6":"Kör in i rondellen och tag sjätte avfarten[ in på <b>%s</b>]",
"DIRECTION_11-7":"Kör in i rondellen och tag sjunde avfarten[ in på <b>%s</b>]",
"DIRECTION_11-8":"Kör in i rondellen och tag åttonde avfarten[ in på <b>%s</b>]",
"DIRECTION_11-9":"Kör in i rondellen och tag nionde avfarten[ in på <b>%s</b>]",
"DIRECTION_11-x":"Kör in i rondellen och tag en av de allt för många avfarterna[ in på <b>%s</b>]",
"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." +
"<br/><br/>" +
"Under tiden kanske du vill kartlägga ditt närområde..." +
"<br/><br/><br/>[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. " +
"<br/><br/>" +
"Frukta inte, om ditt språk inte finns. " +
"Du kan då hjälpa till och översätta OSRM till ditt språk! " +
"Visit <a href='https://github.com/DennisSchiefer/Project-OSRM-Web'>here</a> 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. " +
"<br/><br/>" +
"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. " +
"<br/><br/>" +
"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");

View File

@ -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 <b>%s</b>]",
"DIRECTION_1":"Devam[ onto <b>%s</b>]",
"DIRECTION_2":"Hafif sağa dönün[ onto <b>%s</b>]",
"DIRECTION_3":"Sağa dönün[ onto <b>%s</b>]",
"DIRECTION_4":"Sağa keskin dönün[ onto <b>%s</b>]",
"DIRECTION_5":"U-Dönüşü[ onto <b>%s</b>]",
"DIRECTION_6":"Sola keskin dönün[ onto <b>%s</b>]",
"DIRECTION_7":"Sola dönün[ onto <b>%s</b>]",
"DIRECTION_8":"Hafif sola dönün[ onto <b>%s</b>]",
"DIRECTION_10":"Yön <b>%d</b>[ onto <b>%s</b>]",
"DIRECTION_11-1":"Kavşağa girin ve ilk çıkıştan çıkın[ onto <b>%s</b>]",
"DIRECTION_11-2":"Kavşağa girin ve ikinci çıkıştan çıkın[ onto <b>%s</b>]",
"DIRECTION_11-3":"Kavşağa girin ve üçüncü çıkıştan çıkın[ onto <b>%s</b>]",
"DIRECTION_11-4":"Kavşağa girin ve dördüncü çıkıştan çıkın[ onto <b>%s</b>]",
"DIRECTION_11-5":"Kavşağa girin ve beşinci çıkıştan çıkın[ onto <b>%s</b>]",
"DIRECTION_11-6":"Kavşağa girin ve altıncı çıkıştan çıkın[ onto <b>%s</b>]",
"DIRECTION_11-7":"Kavşağa girin ve yedinci çıkıştan çıkın[ onto <b>%s</b>]",
"DIRECTION_11-8":"Kavşağa girin ve sekizinci çıkıştan çıkın[ onto <b>%s</b>]",
"DIRECTION_11-9":"Kavşağa girin ve dokuzuncu çıkıştan çıkın[ onto <b>%s</b>]",
"DIRECTION_11-x":"Kavşağa girin ve birçok çıkışın birinden çıkın[ onto <b>%s</b>]",
"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." +
"<br/><br/>" +
"Aynı zamanda dışarıya çıkıp komşunuzu haritalamayı isteyebilirsiniz..." +
"<br/><br/><br/>[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ğıılna menüye tıklayabilirsiniz. " +
"<br/><br/>" +
"İstediğiniz dili bulamazsanız umutsuzluğa düşmeyin. " +
"Eğer isterseniz, fazladan çeviriler elde etmek için yardım edebilirsiniz! " +
"Ziyaret edin <a href='https://github.com/DennisSchiefer/Project-OSRM-Web'>here</a> 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. " +
"<br/><br/>" +
"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. " +
"<br/><br/>" +
"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");

View File

@ -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;
}
/* ------------------------------------------------------------------------ */

View File

@ -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<size; i++) {
var distance = OSRM.Utils.toHumanDistance(OSRM.G.response.alternative_summaries[i].total_distance);
var time = OSRM.Utils.toHumanTime(OSRM.G.response.alternative_summaries[i].total_time);
var tooltip = OSRM.loc("DISTANCE")+": "+distance+" "+OSRM.loc("DURATION")+": "+time;
var route_name = "";
for(var j=0, sizej=OSRM.G.response.alternative_names[i].length; j<sizej; j++)
route_name += (j==0 ? " &#10;(" : "") + OSRM.G.response.alternative_names[i][j] + (j+1<sizej ? " - " : ")");
var tooltip = OSRM.loc("DISTANCE")+": "+distance+" &#10;"+OSRM.loc("DURATION")+": "+time+route_name;
var buttonClass = (i == OSRM.G.active_alternative) ? "button-pressed" : "button";
data = '<a class="'+buttonClass+' top-right-button" id="'+buttons[i].id+'" title="'+tooltip+'">'+buttons[i].label+'</a>' + 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 )

View File

@ -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() + '&center=' + 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 = '[<a class="route-link" onClick="document.location.href=\'' + OSRM.G.active_routing_server_url + query_string + '&output=gpx\';">'+OSRM.loc("GPX_FILE")+'</a>]';
// 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 += '<td class="description-body-items">';
var pos = positions[response.route_instructions[i][3]];
body += '<div class="description-body-item" onclick="OSRM.RoutingDescription.onClickRouteDescription('+pos.lat.toFixed(6)+","+pos.lng.toFixed(6)+')">';
body += '<div id="description-'+i+'" class="description-body-item '+(selected_description==i ? "description-body-item-selected": "")+'" ' +
'onclick="OSRM.RoutingDescription.onClickRouteDescription('+pos.lat.toFixed(6)+","+pos.lng.toFixed(6)+","+i+')" ' +
'onmouseover="OSRM.RoutingDescription.onMouseOverRouteDescription('+pos.lat.toFixed(6)+","+pos.lng.toFixed(6)+')" ' +
'onmouseout="OSRM.RoutingDescription.onMouseOutRouteDescription('+pos.lat.toFixed(6)+","+pos.lng.toFixed(6)+')">';
// build route description
if( response.route_instructions[i][1] != "" )