Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@ node_modules/
*.swp
bundle*raw*
bundle*map

.idea
5 changes: 4 additions & 1 deletion i18n/de.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,8 @@ module.exports = {
'Bike': 'Fahrrad',
'Car': 'Auto',
'Foot': 'Fussgänger',
'About': '<a href=/about.html>Informationen zu diesem Service</a>'
'About': '<a href=/about.html>Informationen zu diesem Service</a>',
'OpenStreetMap contributors': 'OpenStreetMap Mitwirkende',
'Imagery': 'Bilddaten',
'Data': 'Daten'
};
2 changes: 1 addition & 1 deletion i18n/en.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ module.exports = {
'Bike': 'Bike',
'Car': 'Car',
'Foot': 'Foot',
'About': '<a href=/about.html>About this service</a>'
'About': '<a href=/about.html>About this service</a>',
};
5 changes: 4 additions & 1 deletion i18n/es.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,8 @@ module.exports = {
'Bike': 'Bicicleta',
'Car': 'Coche',
'Foot': 'Peatón',
'About': '<a href=/about.html>Sobre este servicio</a>'
'About': '<a href=/about.html>Sobre este servicio</a>',
'OpenStreetMap contributors': 'Colaboradores de OpenStreetMap',
'Imagery': 'Imágenes',
'Data': 'Datos'
};
5 changes: 4 additions & 1 deletion i18n/fr.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,8 @@ module.exports = {
'Bike': 'Vélo',
'Car': 'Voiture',
'Foot': 'Piéton',
'About': '<a href=/about.html>Sur ce service</a>'
'About': '<a href=/about.html>Sur ce service</a>',
'OpenStreetMap contributors': 'les contributeurs d’OpenStreetMap',
'Imagery': 'Imagerie',
'Data': 'Les données'
};
5 changes: 4 additions & 1 deletion i18n/ru.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,8 @@ module.exports = {
'Bike': 'велосипе́д',
'Car': 'автомоби́ль',
'Foot': 'пешехо́д',
'About': '<a href=/about.html>информа́ция</a>'
'About': '<a href=/about.html>информа́ция</a>',
'OpenStreetMap contributors': 'Участники OpenStreetMap',
'Imagery': 'образность',
'Data': 'Данные'
};
3 changes: 2 additions & 1 deletion i18n/sv.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,6 @@ module.exports = {
'Bike': 'Bike',
'Car': 'Car',
'Foot': 'Foot',
'About': '<a href=/about.html>About this service</a>'
'About': '<a href=/about.html>About this service</a>',
'OpenStreetMap contributors': 'OpenStreetMaps bidragsgivare'
};
3 changes: 2 additions & 1 deletion i18n/vi.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,6 @@ module.exports = {
'Bike': 'Bike',
'Car': 'Car',
'Foot': 'Foot',
'About': '<a href=/about.html>About this service</a>'
'About': '<a href=/about.html>About this service</a>',
'OpenStreetMap contributors': 'những người đóng góp vào OpenStreetMap'
};
20 changes: 17 additions & 3 deletions src/leaflet_options.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,30 @@
'use strict';

var L = require('leaflet');
var _localization = require('./localization');
var _links = require('./links');
var _parsedOptions = _links.parse(window.location.search.slice(1));
var _local = _localization.get(_parsedOptions.language);

// translate and check variables
var dataTrans = _local['Data']? _local['Data'] :'Data';
var imageryTrans = _local['Imagery']? _local['Imagery'] :'Imagery';

// set attribution string
var osmAttrImagery = imageryTrans +' © <a rel="license" target="_blank" href="https://www.openstreetmap.org/copyright">'+_local['OpenStreetMap contributors']+'</a>';
var osmAttrData = dataTrans+' © <a rel="license" target="_blank" href="http://opendatacommons.org/licenses/odbl/">Open Database License (ODbL)</a>';

var de = L.tileLayer('//{s}.tile.openstreetmap.de/tiles/osmde/{z}/{x}/{y}.png', {
attribution: '<a target="_blank" href="http://www.openstreetmap.org/">Karte hergestellt aus OpenStreetMap-Daten</a> | Lizenz: <a rel="license" target="_blank" href="http://opendatacommons.org/licenses/odbl/">Open Database License (ODbL)</a>'
format: 'image/png',
attribution: osmAttrImagery
}),
standard = L.tileLayer('//{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
attribution: '© <a href="/copyright">OpenStreetMap contributors</a>'
format: 'image/png',
attribution: osmAttrImagery
}),

hiking = L.tileLayer('//tile.waymarkedtrails.org/hiking/{z}/{x}/{y}.png', {}),
bike = L.tileLayer('//tile.waymarkedtrails.org/cycling/{z}/{x}/{y}.png', {})
bike = L.tileLayer('//tile.waymarkedtrails.org/cycling/{z}/{x}/{y}.png', {});

module.exports = {
defaultState: {
Expand Down