Merge remote-tracking branch 'upstream/master' into heightgraph-transpiled
This commit is contained in:
commit
3c1f5d0d6d
62 changed files with 4486 additions and 3554 deletions
|
|
@ -2,3 +2,6 @@ language: node_js
|
|||
node_js:
|
||||
- lts/*
|
||||
cache: yarn
|
||||
script:
|
||||
- yarn test
|
||||
- yarn lint
|
||||
|
|
|
|||
|
|
@ -1,5 +1,11 @@
|
|||
# BRouter-Web Changelog
|
||||
|
||||
## 0.14.0 (2020-12-04)
|
||||
|
||||
### New Features [fr]
|
||||
|
||||
- [French users only] New button to add 20km allowed zone - by [@bagage](https://github.com/bagage) ([#347](https://github.com/nrenner/brouter-web/pull/347), [#350](https://github.com/nrenner/brouter-web/pull/350), [#352](https://github.com/nrenner/brouter-web/pull/352))
|
||||
|
||||
## 0.13.0 (2020-08-04)
|
||||
|
||||
See also [milestone 0.13.0](https://github.com/nrenner/brouter-web/milestone/14?closed=1)
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@
|
|||
'vm-forum-velomobil-schnell',
|
||||
'fastbike-lowtraffic',
|
||||
'fastbike-asia-pacific',
|
||||
'hiking-beta'
|
||||
'hiking-beta',
|
||||
];
|
||||
|
||||
// Removes default base layers when 'true'. Useful for only having custom layers (see below).
|
||||
|
|
@ -84,22 +84,22 @@
|
|||
weight: 5,
|
||||
dashArray: [10, 10],
|
||||
opacity: 0.6,
|
||||
color: 'magenta'
|
||||
color: 'magenta',
|
||||
},
|
||||
track: {
|
||||
weight: 5,
|
||||
color: 'magenta',
|
||||
opacity: BR.conf.defaultOpacity
|
||||
opacity: BR.conf.defaultOpacity,
|
||||
},
|
||||
trackCasing: {
|
||||
weight: 8,
|
||||
color: 'white',
|
||||
// assumed to be same as track, see setOpacity
|
||||
opacity: BR.conf.defaultOpacity
|
||||
opacity: BR.conf.defaultOpacity,
|
||||
},
|
||||
nodata: {
|
||||
color: 'darkred'
|
||||
}
|
||||
color: 'darkred',
|
||||
},
|
||||
};
|
||||
|
||||
BR.conf.markerColors = {
|
||||
|
|
@ -107,7 +107,7 @@
|
|||
poi: '#436978',
|
||||
start: '#72b026',
|
||||
via: '#38aadd',
|
||||
stop: '#d63e2a'
|
||||
stop: '#d63e2a',
|
||||
};
|
||||
|
||||
// transit (intermodal routing) demo config
|
||||
|
|
@ -121,7 +121,7 @@
|
|||
'fastbike',
|
||||
'shortest',
|
||||
'moped',
|
||||
'car-test'
|
||||
'car-test',
|
||||
];
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -197,6 +197,12 @@ input#trackname:focus:invalid {
|
|||
.pois-draw-enabled {
|
||||
cursor: cell;
|
||||
}
|
||||
.circlego-draw-enabled {
|
||||
cursor: pointer;
|
||||
}
|
||||
.circlego-outside {
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
#map {
|
||||
/* center error message horizontally */
|
||||
|
|
|
|||
71
gulpfile.js
71
gulpfile.js
|
|
@ -34,16 +34,15 @@ var debug = false;
|
|||
|
||||
var paths = {
|
||||
// see overrides in package.json
|
||||
scriptsConfig: mainNpmFiles().filter(f => RegExp('url-search-params/.*\\.js', 'i').test(f)),
|
||||
scriptsConfig: mainNpmFiles().filter((f) => RegExp('url-search-params/.*\\.js', 'i').test(f)),
|
||||
scripts: [
|
||||
'node_modules/jquery/dist/jquery.js',
|
||||
'node_modules/tether/dist/js/tether.js',
|
||||
'node_modules/async/lib/async.js',
|
||||
'node_modules/leaflet/dist/leaflet-src.js'
|
||||
'node_modules/leaflet/dist/leaflet-src.js',
|
||||
]
|
||||
.concat(
|
||||
mainNpmFiles().filter(
|
||||
f =>
|
||||
(f) =>
|
||||
RegExp('.*\\.js', 'i').test(f) &&
|
||||
!RegExp('.*\\.min\\.js', 'i').test(f) &&
|
||||
!RegExp('url-search-params/.*\\.js', 'i').test(f)
|
||||
|
|
@ -58,13 +57,13 @@ var paths = {
|
|||
'js/util/*.js',
|
||||
'js/plugin/*.js',
|
||||
'js/control/*.js',
|
||||
'js/index.js'
|
||||
'js/index.js',
|
||||
]),
|
||||
styles: mainNpmFiles()
|
||||
.filter(f => RegExp('.*\\.css', 'i').test(f) && !RegExp('.*\\.min\\.css', 'i').test(f))
|
||||
.filter((f) => RegExp('.*\\.css', 'i').test(f) && !RegExp('.*\\.min\\.css', 'i').test(f))
|
||||
.concat('css/*.css'),
|
||||
images: mainNpmFiles().filter(f => RegExp('.*.+(png|gif|svg)', 'i').test(f)),
|
||||
fonts: mainNpmFiles().filter(f => RegExp('font-awesome/fonts/.*', 'i').test(f)),
|
||||
images: mainNpmFiles().filter((f) => RegExp('.*.+(png|gif|svg)', 'i').test(f)),
|
||||
fonts: mainNpmFiles().filter((f) => RegExp('font-awesome/fonts/.*', 'i').test(f)),
|
||||
locales: 'locales/*.json',
|
||||
layers: 'layers/**/*.geojson',
|
||||
layersDestName: 'layers.js',
|
||||
|
|
@ -72,12 +71,12 @@ var paths = {
|
|||
'layers/config/config.js',
|
||||
'layers/config/tree.js',
|
||||
'layers/config/overrides.js',
|
||||
'layers/config/geometry.js'
|
||||
'layers/config/geometry.js',
|
||||
],
|
||||
layersConfigDestName: 'layersConf.js',
|
||||
zip: ['dist/**', 'index.html', 'config.template.js', 'keys.template.js'],
|
||||
dest: 'dist',
|
||||
destName: 'brouter-web'
|
||||
destName: 'brouter-web',
|
||||
};
|
||||
|
||||
gulp.task('clean', function (cb) {
|
||||
|
|
@ -129,13 +128,13 @@ gulp.task('styles', function() {
|
|||
}
|
||||
|
||||
return distUrl;
|
||||
}
|
||||
},
|
||||
})
|
||||
)
|
||||
.pipe(concat(paths.destName + '.css'))
|
||||
.pipe(
|
||||
cleanCSS({
|
||||
rebase: false
|
||||
rebase: false,
|
||||
})
|
||||
)
|
||||
.pipe(postcss([autoprefixer({ remove: false })]))
|
||||
|
|
@ -171,13 +170,7 @@ gulp.task('watch', function() {
|
|||
gulp.watch(paths.locales, gulp.series('locales', 'reload'));
|
||||
gulp.watch(paths.styles, gulp.series('styles', 'reload'));
|
||||
gulp.watch(paths.layersConfig, gulp.series('layers_config', 'reload'));
|
||||
gulp.watch(
|
||||
['./index.html']
|
||||
.concat(paths.images)
|
||||
.concat(paths.fonts)
|
||||
.concat(paths.locales),
|
||||
gulp.series('reload')
|
||||
);
|
||||
gulp.watch(['./index.html'].concat(paths.images).concat(paths.fonts).concat(paths.locales), gulp.series('reload'));
|
||||
});
|
||||
|
||||
// Print paths to console, for manually debugging the gulp build
|
||||
|
|
@ -187,10 +180,7 @@ gulp.task('log', function() {
|
|||
// var src = paths.styles
|
||||
// var src = paths.images
|
||||
// var src = paths.locales
|
||||
var src = paths.scripts
|
||||
.concat(paths.styles)
|
||||
.concat(paths.images)
|
||||
.concat(paths.locales);
|
||||
var src = paths.scripts.concat(paths.styles).concat(paths.images).concat(paths.locales);
|
||||
|
||||
return gulp.src(src).pipe(gulpDebug());
|
||||
});
|
||||
|
|
@ -199,7 +189,7 @@ gulp.task('inject', function() {
|
|||
var target = gulp.src('index.html');
|
||||
var sources = gulp.src(paths.scripts.concat(paths.styles), {
|
||||
base: '.',
|
||||
read: false
|
||||
read: false,
|
||||
});
|
||||
|
||||
return target.pipe(inject(sources, { relative: true })).pipe(gulp.dest('.'));
|
||||
|
|
@ -280,18 +270,15 @@ gulp.task('i18next', function() {
|
|||
loadPath: 'locales/{{lng}}.json',
|
||||
|
||||
// the destination path is relative to your `gulp.dest()` path
|
||||
savePath: 'locales/{{lng}}.json'
|
||||
}
|
||||
savePath: 'locales/{{lng}}.json',
|
||||
},
|
||||
})
|
||||
)
|
||||
.pipe(gulp.dest('.'));
|
||||
});
|
||||
|
||||
gulp.task('layers_config', function () {
|
||||
return gulp
|
||||
.src(paths.layersConfig)
|
||||
.pipe(concat(paths.layersConfigDestName))
|
||||
.pipe(gulp.dest(paths.dest));
|
||||
return gulp.src(paths.layersConfig).pipe(concat(paths.layersConfigDestName)).pipe(gulp.dest(paths.dest));
|
||||
});
|
||||
|
||||
// Bundles layer files. To download and extract run "yarn layers"
|
||||
|
|
@ -332,9 +319,9 @@ gulp.task(
|
|||
gulp.series('debug', function (cb) {
|
||||
server.init({
|
||||
server: {
|
||||
baseDir: './'
|
||||
baseDir: './',
|
||||
},
|
||||
open: false
|
||||
open: false,
|
||||
});
|
||||
cb();
|
||||
})
|
||||
|
|
@ -344,7 +331,7 @@ gulp.task('release:zip', function() {
|
|||
gutil.log(gutil.colors.green('Build brouter-web.' + nextVersion + '.zip'));
|
||||
return gulp
|
||||
.src(paths.zip, {
|
||||
base: '.'
|
||||
base: '.',
|
||||
})
|
||||
.pipe(zip('brouter-web.' + nextVersion + '.zip'))
|
||||
.pipe(gulp.dest('.'));
|
||||
|
|
@ -358,7 +345,7 @@ gulp.task('release:zip_standalone', function() {
|
|||
|
||||
var brouterWeb = gulp
|
||||
.src(paths.zip, {
|
||||
base: '.'
|
||||
base: '.',
|
||||
})
|
||||
.pipe(
|
||||
rename(function (path) {
|
||||
|
|
@ -372,10 +359,10 @@ gulp.task('release:zip_standalone', function() {
|
|||
.src(
|
||||
[
|
||||
'misc/readmes/profile_developers_guide.txt',
|
||||
'brouter-server/target/brouter-server-*-jar-with-dependencies.jar'
|
||||
'brouter-server/target/brouter-server-*-jar-with-dependencies.jar',
|
||||
],
|
||||
{
|
||||
cwd: path.join(process.cwd(), '../brouter')
|
||||
cwd: path.join(process.cwd(), '../brouter'),
|
||||
}
|
||||
)
|
||||
.pipe(
|
||||
|
|
@ -392,22 +379,20 @@ gulp.task('release:zip_standalone', function() {
|
|||
'!profiles2/all.brf',
|
||||
'!profiles2/car-eco-suspect_scan.brf',
|
||||
'!profiles2/car-traffic_analysis.brf',
|
||||
'!profiles2/softaccess.brf'
|
||||
'!profiles2/softaccess.brf',
|
||||
],
|
||||
{
|
||||
cwd: path.join(process.cwd(), '../brouter/misc/'),
|
||||
base: '../brouter/misc/'
|
||||
base: '../brouter/misc/',
|
||||
}
|
||||
);
|
||||
|
||||
var serverScripts = gulp.src(['standalone/**'], {
|
||||
cwd: path.join(process.cwd(), '../brouter/misc/scripts/'),
|
||||
base: '../brouter/misc/scripts/'
|
||||
base: '../brouter/misc/scripts/',
|
||||
});
|
||||
|
||||
return merge(brouterWeb, root, serverRoot, serverProfiles, serverScripts)
|
||||
.pipe(zip(destName))
|
||||
.pipe(gulp.dest('.'));
|
||||
return merge(brouterWeb, root, serverRoot, serverProfiles, serverScripts).pipe(zip(destName)).pipe(gulp.dest('.'));
|
||||
});
|
||||
|
||||
gulp.task('release:publish', function () {
|
||||
|
|
@ -415,7 +400,7 @@ gulp.task('release:publish', function() {
|
|||
release({
|
||||
tag: nextVersion,
|
||||
token: ghToken,
|
||||
manifest: pkg
|
||||
manifest: pkg,
|
||||
})
|
||||
);
|
||||
});
|
||||
|
|
|
|||
55
index.html
55
index.html
|
|
@ -25,7 +25,7 @@
|
|||
<span class="fa fa-bars"></span>
|
||||
</button>
|
||||
<a class="navbar-brand order-md-last" href="#" data-toggle="modal" data-target="#about"
|
||||
>BRouter-Web <sup class="version">0.13.0</sup></a
|
||||
>BRouter-Web <sup class="version">0.14.0</sup></a
|
||||
>
|
||||
<div class="collapse navbar-collapse" id="collapsingNavbar">
|
||||
<div class="navbar-nav">
|
||||
|
|
@ -41,9 +41,7 @@
|
|||
data-icon="fa-random"
|
||||
id="alternative"
|
||||
>
|
||||
<option data-i18n="navbar.alternative.original" value="0" selected
|
||||
>Original
|
||||
</option>
|
||||
<option data-i18n="navbar.alternative.original" value="0" selected>Original</option>
|
||||
<option data-i18n="navbar.alternative.first" value="1">1st alternative</option>
|
||||
<option data-i18n="navbar.alternative.second" value="2">2nd alternative</option>
|
||||
<option data-i18n="navbar.alternative.third" value="3">3rd alternative</option>
|
||||
|
|
@ -194,9 +192,7 @@
|
|||
<div class="modal-dialog modal-lg" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title" data-i18n="layers.customize">
|
||||
Customize layers
|
||||
</h4>
|
||||
<h4 class="modal-title" data-i18n="layers.customize">Customize layers</h4>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
|
|
@ -263,9 +259,7 @@
|
|||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title" data-i18n="about.title">
|
||||
About
|
||||
</h4>
|
||||
<h4 class="modal-title" data-i18n="about.title">About</h4>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
|
|
@ -358,21 +352,18 @@
|
|||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title" data-i18n="loadNogos.title">
|
||||
Load no-go areas
|
||||
</h4>
|
||||
<h4 class="modal-title" data-i18n="loadNogos.title">Load no-go areas</h4>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p id="nogoError" class="invalid-feedback" style="display: none;"></p>
|
||||
<p id="nogoError" class="invalid-feedback" style="display: none"></p>
|
||||
<form>
|
||||
<fieldset>
|
||||
<legend data-i18n="loadNogos.source">
|
||||
Source
|
||||
</legend>
|
||||
<legend data-i18n="loadNogos.source">Source</legend>
|
||||
<p>
|
||||
<input type="text" id="nogoJSON" hidden />
|
||||
<label for="nogoURL" data-i18n="loadNogos.url">URL: </label>
|
||||
<input type="text" name="nogoURL" id="nogoURL" /><br />
|
||||
or<br />
|
||||
|
|
@ -381,9 +372,7 @@
|
|||
</p>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<legend data-i18n="loadNogos.defaultProperties">
|
||||
Default properties
|
||||
</legend>
|
||||
<legend data-i18n="loadNogos.defaultProperties">Default properties</legend>
|
||||
<p>
|
||||
<label for="nogoWeight" data-i18n="loadNogos.nogoWeight"
|
||||
>No-go weight (-1 means impassable):
|
||||
|
|
@ -440,9 +429,7 @@
|
|||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title" data-i18n="export.title">
|
||||
Export route
|
||||
</h4>
|
||||
<h4 class="modal-title" data-i18n="export.title">Export route</h4>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
|
|
@ -458,9 +445,7 @@
|
|||
</div>
|
||||
<fieldset id="export-format" class="form-group">
|
||||
<div class="row">
|
||||
<legend class="col-form-label col-sm-2" data-i18n="export.format">
|
||||
Format
|
||||
</legend>
|
||||
<legend class="col-form-label col-sm-2" data-i18n="export.format">Format</legend>
|
||||
<div class="col-sm-10">
|
||||
<div class="form-check">
|
||||
<label class="form-check-label">
|
||||
|
|
@ -516,9 +501,7 @@
|
|||
</fieldset>
|
||||
<fieldset id="export-includes" class="form-group">
|
||||
<div class="row">
|
||||
<legend class="col-form-label col-sm-2" data-i18n="export.include">
|
||||
Include
|
||||
</legend>
|
||||
<legend class="col-form-label col-sm-2" data-i18n="export.include">Include</legend>
|
||||
<div class="col-sm-10">
|
||||
<div class="form-check">
|
||||
<label class="form-check-label">
|
||||
|
|
@ -570,9 +553,7 @@
|
|||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title" data-i18n="trackasroute.title">
|
||||
Load Track as Route
|
||||
</h4>
|
||||
<h4 class="modal-title" data-i18n="trackasroute.title">Load Track as Route</h4>
|
||||
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
|
|
@ -595,7 +576,7 @@
|
|||
<label
|
||||
for="loadedittrackFile"
|
||||
class="custom-file-label"
|
||||
style="white-space: nowrap; overflow: hidden; text-overflow: ellipsis;"
|
||||
style="white-space: nowrap; overflow: hidden; text-overflow: ellipsis"
|
||||
>
|
||||
</label
|
||||
><br />
|
||||
|
|
@ -1019,9 +1000,7 @@
|
|||
<div id="stats-container" class="flexrow flexgrow">
|
||||
<ul id="stats">
|
||||
<li>
|
||||
<div class="text-muted small d-none d-md-block" data-i18n="footer.distance">
|
||||
Distance
|
||||
</div>
|
||||
<div class="text-muted small d-none d-md-block" data-i18n="footer.distance">Distance</div>
|
||||
<p class="stats-label">
|
||||
<span id="distance">-</span> <abbr
|
||||
data-i18n="[title]footer.kilometer;footer.kilometer-abbrev"
|
||||
|
|
@ -1031,9 +1010,7 @@
|
|||
</p>
|
||||
</li>
|
||||
<li>
|
||||
<div class="text-muted small d-none d-md-block" data-i18n="footer.travel-time">
|
||||
Travel time
|
||||
</div>
|
||||
<div class="text-muted small d-none d-md-block" data-i18n="footer.travel-time">Travel time</div>
|
||||
<p class="stats-label">
|
||||
<span id="totaltime">-</span> <abbr
|
||||
data-i18n="[title]footer.hours;footer.hours-abbrev"
|
||||
|
|
|
|||
|
|
@ -21,6 +21,6 @@
|
|||
BR.Browser = {
|
||||
touchScreen: touchScreen,
|
||||
touchScreenDetectable: touchScreenDetectable,
|
||||
touch: touch
|
||||
touch: touch,
|
||||
};
|
||||
})();
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ BR.LayersConfig = L.Class.extend({
|
|||
if (BR.Util.localStorageAvailable()) {
|
||||
var defaultLayers = {
|
||||
baseLayers: baseLayers,
|
||||
overlays: overlays
|
||||
overlays: overlays,
|
||||
};
|
||||
localStorage.setItem('map/defaultLayers', JSON.stringify(defaultLayers));
|
||||
}
|
||||
|
|
@ -45,9 +45,9 @@ BR.LayersConfig = L.Class.extend({
|
|||
properties: {
|
||||
id: id,
|
||||
name: id.replace('.', ' '),
|
||||
dataSource: 'leaflet-providers'
|
||||
dataSource: 'leaflet-providers',
|
||||
},
|
||||
type: 'Feature'
|
||||
type: 'Feature',
|
||||
};
|
||||
BR.layerIndex[id] = obj;
|
||||
}
|
||||
|
|
@ -162,7 +162,7 @@ BR.LayersConfig = L.Class.extend({
|
|||
name = found[1];
|
||||
result = {
|
||||
name: name,
|
||||
urlVar: prefix + name
|
||||
urlVar: prefix + name,
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -218,7 +218,7 @@ BR.LayersConfig = L.Class.extend({
|
|||
|
||||
var options = {
|
||||
maxZoom: this._map.getMaxZoom(),
|
||||
bounds: layerData.geometry && !props.worldTiles ? L.geoJson(layerData.geometry).getBounds() : null
|
||||
bounds: layerData.geometry && !props.worldTiles ? L.geoJson(layerData.geometry).getBounds() : null,
|
||||
};
|
||||
if (props.mapUrl) {
|
||||
options.mapLink =
|
||||
|
|
@ -237,7 +237,7 @@ BR.LayersConfig = L.Class.extend({
|
|||
layer = L.tileLayer.provider(props.id);
|
||||
|
||||
var layerOptions = L.Util.extend(options, {
|
||||
maxNativeZoom: layer.options.maxZoom
|
||||
maxNativeZoom: layer.options.maxZoom,
|
||||
});
|
||||
L.setOptions(layer, layerOptions);
|
||||
} else if (props.dataSource === 'LayersCollection') {
|
||||
|
|
@ -245,7 +245,7 @@ BR.LayersConfig = L.Class.extend({
|
|||
url,
|
||||
L.Util.extend(options, {
|
||||
minZoom: props.minZoom || 0,
|
||||
maxNativeZoom: props.maxZoom
|
||||
maxNativeZoom: props.maxZoom,
|
||||
})
|
||||
);
|
||||
if (props.subdomains) {
|
||||
|
|
@ -260,7 +260,7 @@ BR.LayersConfig = L.Class.extend({
|
|||
minZoom: props.min_zoom || 0,
|
||||
maxNativeZoom: props.max_zoom,
|
||||
subdomains: getSubdomains(josmUrl),
|
||||
attribution: convertAttributionJosm(props)
|
||||
attribution: convertAttributionJosm(props),
|
||||
});
|
||||
|
||||
if (props.type && props.type === 'wms') {
|
||||
|
|
@ -268,7 +268,7 @@ BR.LayersConfig = L.Class.extend({
|
|||
url,
|
||||
L.Util.extend(josmOptions, {
|
||||
layers: props.layers,
|
||||
format: props.format
|
||||
format: props.format,
|
||||
})
|
||||
);
|
||||
} else {
|
||||
|
|
@ -287,7 +287,7 @@ BR.LayersConfig = L.Class.extend({
|
|||
layer.id = props.id;
|
||||
|
||||
return layer;
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
BR.layersConfig = function (map) {
|
||||
|
|
|
|||
18
js/Map.js
18
js/Map.js
|
|
@ -4,8 +4,8 @@ BR.Map = {
|
|||
|
||||
L.setOptions(this, {
|
||||
shortcut: {
|
||||
locate: 76 // char code for 'l'
|
||||
}
|
||||
locate: 76, // char code for 'l'
|
||||
},
|
||||
});
|
||||
|
||||
BR.keys = BR.keys || {};
|
||||
|
|
@ -18,14 +18,14 @@ BR.Map = {
|
|||
minZoom: 0,
|
||||
maxZoom: maxZoom,
|
||||
// fix for route drag on mobile (#285), until next Leaflet version released (> 1.6.0)
|
||||
tap: false
|
||||
tap: false,
|
||||
});
|
||||
|
||||
if (BR.Util.getResponsiveBreakpoint() >= '3md') {
|
||||
L.control
|
||||
.zoom({
|
||||
zoomInTitle: i18next.t('keyboard.generic-shortcut', { action: '$t(map.zoomInTitle)', key: '+' }),
|
||||
zoomOutTitle: i18next.t('keyboard.generic-shortcut', { action: '$t(map.zoomOutTitle)', key: '-' })
|
||||
zoomOutTitle: i18next.t('keyboard.generic-shortcut', { action: '$t(map.zoomOutTitle)', key: '-' }),
|
||||
})
|
||||
.addTo(map);
|
||||
}
|
||||
|
|
@ -77,7 +77,7 @@ BR.Map = {
|
|||
minZoom: 1,
|
||||
maxZoom: 19,
|
||||
attribution:
|
||||
'© <a href="https://www.digitalglobe.com/platforms/mapsapi">DigitalGlobe</a> (<a href="https://bit.ly/mapsapiview">Terms of Use</a>)'
|
||||
'© <a href="https://www.digitalglobe.com/platforms/mapsapi">DigitalGlobe</a> (<a href="https://bit.ly/mapsapiview">Terms of Use</a>)',
|
||||
}
|
||||
);
|
||||
baseLayers[i18next.t('map.layer.digitalglobe')] = recent;
|
||||
|
|
@ -105,10 +105,10 @@ BR.Map = {
|
|||
var locationControl = L.control
|
||||
.locate({
|
||||
strings: {
|
||||
title: i18next.t('keyboard.generic-shortcut', { action: '$t(map.locate-me)', key: 'L' })
|
||||
title: i18next.t('keyboard.generic-shortcut', { action: '$t(map.locate-me)', key: 'L' }),
|
||||
},
|
||||
icon: 'fa fa-location-arrow',
|
||||
iconLoading: 'fa fa-spinner fa-pulse'
|
||||
iconLoading: 'fa fa-spinner fa-pulse',
|
||||
})
|
||||
.addTo(map);
|
||||
L.DomEvent.addListener(
|
||||
|
|
@ -133,7 +133,7 @@ BR.Map = {
|
|||
|
||||
return {
|
||||
map: map,
|
||||
layersControl: layersControl
|
||||
layersControl: layersControl,
|
||||
};
|
||||
},
|
||||
|
||||
|
|
@ -157,5 +157,5 @@ BR.Map = {
|
|||
dl.appendChild(dd);
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
};
|
||||
|
|
|
|||
|
|
@ -106,5 +106,5 @@ BR.Util = {
|
|||
var temp = document.createElement('div');
|
||||
temp.textContent = str;
|
||||
return temp.innerHTML;
|
||||
}
|
||||
},
|
||||
};
|
||||
|
|
|
|||
|
|
@ -95,5 +95,5 @@ BR.ControlLayers = L.Control.Layers.extend({
|
|||
layer.setZIndex(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
});
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@ BR.Export = L.Class.extend({
|
|||
|
||||
options: {
|
||||
shortcut: {
|
||||
export: 88 // char code for 'x'
|
||||
}
|
||||
export: 88, // char code for 'x'
|
||||
},
|
||||
},
|
||||
|
||||
initialize: function (router, pois) {
|
||||
|
|
@ -47,7 +47,7 @@ BR.Export = L.Class.extend({
|
|||
var name = encodeURIComponent(exportForm['trackname'].value);
|
||||
var includeWaypoints = exportForm['include-waypoints'].checked;
|
||||
|
||||
var uri = this.router.getUrl(this.latLngs, this.pois.getMarkers(), format, name, includeWaypoints);
|
||||
var uri = this.router.getUrl(this.latLngs, this.pois.getMarkers(), null, format, name, includeWaypoints);
|
||||
|
||||
e.preventDefault();
|
||||
|
||||
|
|
@ -88,13 +88,13 @@ BR.Export = L.Class.extend({
|
|||
} else if (from === to) {
|
||||
trackname.value = i18next.t('export.route-loop', {
|
||||
from: from,
|
||||
distance: distance
|
||||
distance: distance,
|
||||
});
|
||||
} else {
|
||||
trackname.value = i18next.t('export.route-from-to', {
|
||||
from: from,
|
||||
to: to,
|
||||
distance: distance
|
||||
distance: distance,
|
||||
});
|
||||
}
|
||||
|
||||
|
|
@ -137,7 +137,7 @@ BR.Export = L.Class.extend({
|
|||
this._generateTrackname();
|
||||
$('#export').modal('show');
|
||||
}
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
BR.export = function () {
|
||||
|
|
|
|||
|
|
@ -20,5 +20,5 @@ BR.Itinerary = L.Class.extend({
|
|||
html += '</pre>';
|
||||
|
||||
this._content.innerHTML = html;
|
||||
}
|
||||
},
|
||||
});
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ BR.Layers = L.Class.extend({
|
|||
layersData.push([
|
||||
layer,
|
||||
this._customLayers[layer].layer._url,
|
||||
this._customLayers[layer].isOverlay ? 'Overlay' : 'Layer'
|
||||
this._customLayers[layer].isOverlay ? 'Overlay' : 'Layer',
|
||||
]);
|
||||
}
|
||||
if (this._layersTable != null) {
|
||||
|
|
@ -29,13 +29,13 @@ BR.Layers = L.Class.extend({
|
|||
searching: false,
|
||||
paging: false,
|
||||
language: {
|
||||
emptyTable: i18next.t('sidebar.layers.table.empty')
|
||||
emptyTable: i18next.t('sidebar.layers.table.empty'),
|
||||
},
|
||||
columns: [
|
||||
{ title: i18next.t('sidebar.layers.table.name') },
|
||||
{ title: i18next.t('sidebar.layers.table.URL') },
|
||||
{ title: i18next.t('sidebar.layers.table.type') }
|
||||
]
|
||||
{ title: i18next.t('sidebar.layers.table.type') },
|
||||
],
|
||||
});
|
||||
},
|
||||
|
||||
|
|
@ -75,10 +75,7 @@ BR.Layers = L.Class.extend({
|
|||
this._layersControl.removeLayer(this._customLayers[name].layer);
|
||||
this._map.removeLayer(this._customLayers[name].layer);
|
||||
delete this._customLayers[name];
|
||||
this._layersTable
|
||||
.row('.selected')
|
||||
.remove()
|
||||
.draw(false);
|
||||
this._layersTable.row('.selected').remove().draw(false);
|
||||
this._sync();
|
||||
}
|
||||
},
|
||||
|
|
@ -106,7 +103,7 @@ BR.Layers = L.Class.extend({
|
|||
|
||||
this._customLayers[layerName] = {
|
||||
layer: layer,
|
||||
isOverlay: isOverlay
|
||||
isOverlay: isOverlay,
|
||||
};
|
||||
|
||||
if (isOverlay) {
|
||||
|
|
@ -133,5 +130,5 @@ BR.Layers = L.Class.extend({
|
|||
})
|
||||
);
|
||||
}
|
||||
}
|
||||
},
|
||||
});
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ BR.LayersTab = BR.ControlLayers.extend({
|
|||
self._layers[i].layer.setStyle({ opacity: opacity });
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
});
|
||||
L.DomUtil.get('leaflet-control-layers-overlays-opacity-slider').appendChild(overlayOpacitySlider.getElement());
|
||||
},
|
||||
|
|
@ -163,23 +163,23 @@ BR.LayersTab = BR.ControlLayers.extend({
|
|||
plugins: ['checkbox'],
|
||||
checkbox: {
|
||||
whole_node: false,
|
||||
tie_selection: false
|
||||
tie_selection: false,
|
||||
},
|
||||
core: {
|
||||
multiple: false,
|
||||
themes: {
|
||||
icons: false,
|
||||
dots: false
|
||||
dots: false,
|
||||
},
|
||||
data: treeData,
|
||||
},
|
||||
data: treeData
|
||||
}
|
||||
});
|
||||
this.jstree = $('#optional-layers-tree').jstree(true);
|
||||
},
|
||||
|
||||
toJsTree: function (layerTree) {
|
||||
var data = {
|
||||
children: []
|
||||
children: [],
|
||||
};
|
||||
var self = this;
|
||||
|
||||
|
|
@ -187,9 +187,9 @@ BR.LayersTab = BR.ControlLayers.extend({
|
|||
var rootNode = {
|
||||
text: i18next.t('sidebar.layers.category.' + name, name),
|
||||
state: {
|
||||
disabled: true
|
||||
disabled: true,
|
||||
},
|
||||
children: []
|
||||
children: [],
|
||||
};
|
||||
return rootNode;
|
||||
}
|
||||
|
|
@ -217,8 +217,8 @@ BR.LayersTab = BR.ControlLayers.extend({
|
|||
id: id,
|
||||
text: getText(props, parent),
|
||||
state: {
|
||||
checked: self.layersConfig.isDefaultLayer(id, props.overlay)
|
||||
}
|
||||
checked: self.layersConfig.isDefaultLayer(id, props.overlay),
|
||||
},
|
||||
};
|
||||
}
|
||||
return childNode;
|
||||
|
|
@ -363,7 +363,7 @@ BR.LayersTab = BR.ControlLayers.extend({
|
|||
renderer: L.svg({ padding: 1 }),
|
||||
color: '#333',
|
||||
fillOpacity: 0.4,
|
||||
weight: 2
|
||||
weight: 2,
|
||||
}).addTo(this._map);
|
||||
}
|
||||
},
|
||||
|
|
@ -471,7 +471,7 @@ BR.LayersTab = BR.ControlLayers.extend({
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
BR.layersTab = function (baseLayers, overlays, options) {
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ BR.Message = L.Class.extend({
|
|||
options: {
|
||||
// true to manually attach click event to close button,
|
||||
// Bootstrap data-api's auto-initialization doesn't work in Controls because of stopPropagation
|
||||
alert: false
|
||||
alert: false,
|
||||
},
|
||||
|
||||
initialize: function (id, options) {
|
||||
|
|
@ -40,7 +40,17 @@ BR.Message = L.Class.extend({
|
|||
},
|
||||
|
||||
showError: function (err) {
|
||||
if (err == 'Error: target island detected for section 0\n') {
|
||||
if (err && err.message) err = err.message;
|
||||
|
||||
if (err == 'target island detected for section 0\n') {
|
||||
err = i18next.t('warning.no-route-found');
|
||||
} else if (err == 'no track found at pass=0\n') {
|
||||
err = i18next.t('warning.no-route-found');
|
||||
} else if (err == 'to-position not mapped in existing datafile\n') {
|
||||
err = i18next.t('warning.invalid-route-to');
|
||||
} else if (err == 'from-position not mapped in existing datafile\n') {
|
||||
err = i18next.t('warning.invalid-route-from');
|
||||
} else if (err && err.startsWith('null description for: ')) {
|
||||
err = i18next.t('warning.no-route-found');
|
||||
}
|
||||
this._show(err, 'error');
|
||||
|
|
@ -48,7 +58,7 @@ BR.Message = L.Class.extend({
|
|||
|
||||
showWarning: function (msg) {
|
||||
this._show(msg, 'warning');
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
// static instance as global control
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ BR.OpacitySlider = L.Class.extend({
|
|||
orientation: 'vertical',
|
||||
defaultValue: BR.conf.defaultOpacity,
|
||||
title: '',
|
||||
callback: function(opacity) {}
|
||||
callback: function (opacity) {},
|
||||
},
|
||||
|
||||
initialize: function (options) {
|
||||
|
|
@ -30,7 +30,7 @@ BR.OpacitySlider = L.Class.extend({
|
|||
orientation: this.options.orientation,
|
||||
reversed: this.options.reversed,
|
||||
selection: this.options.reversed ? 'before' : 'after', // inverted, serves as track style, see css
|
||||
tooltip: 'hide'
|
||||
tooltip: 'hide',
|
||||
})
|
||||
.on('slide slideStop', { self: this }, function (evt) {
|
||||
evt.data.self.options.callback(evt.value / 100);
|
||||
|
|
@ -65,5 +65,5 @@ BR.OpacitySlider = L.Class.extend({
|
|||
|
||||
getElement: function () {
|
||||
return this.input.slider('getElement');
|
||||
}
|
||||
},
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
BR.OpacitySliderControl = L.Control.extend({
|
||||
options: {
|
||||
position: 'topleft'
|
||||
position: 'topleft',
|
||||
},
|
||||
|
||||
onAdd: function (map) {
|
||||
|
|
@ -49,5 +49,5 @@ BR.OpacitySliderControl = L.Control.extend({
|
|||
});
|
||||
|
||||
return container;
|
||||
}
|
||||
},
|
||||
});
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ BR.Profile = L.Evented.extend({
|
|||
initialize: function () {
|
||||
var textArea = L.DomUtil.get('profile_upload');
|
||||
this.editor = CodeMirror.fromTextArea(textArea, {
|
||||
lineNumbers: true
|
||||
lineNumbers: true,
|
||||
});
|
||||
|
||||
$('#profileEditorTabs a[data-toggle="tab"]').on(
|
||||
|
|
@ -22,7 +22,7 @@ BR.Profile = L.Evented.extend({
|
|||
this.pinned = L.DomUtil.get('profile-pinned');
|
||||
|
||||
this.message = new BR.Message('profile_message', {
|
||||
alert: true
|
||||
alert: true,
|
||||
});
|
||||
},
|
||||
|
||||
|
|
@ -110,7 +110,7 @@ BR.Profile = L.Evented.extend({
|
|||
this.saveWarningShown = true;
|
||||
}
|
||||
}
|
||||
}, this)
|
||||
}, this),
|
||||
});
|
||||
},
|
||||
|
||||
|
|
@ -146,7 +146,7 @@ BR.Profile = L.Evented.extend({
|
|||
that.profileName = profileId;
|
||||
that.cache[profileId] = profileText;
|
||||
}
|
||||
}
|
||||
},
|
||||
});
|
||||
},
|
||||
|
||||
|
|
@ -230,7 +230,7 @@ BR.Profile = L.Evented.extend({
|
|||
description: description,
|
||||
type: paramType,
|
||||
value: value,
|
||||
possible_values: paramValues
|
||||
possible_values: paramValues,
|
||||
};
|
||||
}
|
||||
});
|
||||
|
|
@ -320,5 +320,5 @@ BR.Profile = L.Evented.extend({
|
|||
} else {
|
||||
this._setValue(this._buildCustomProfile(profileText));
|
||||
}
|
||||
}
|
||||
},
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
BR.RoutingOptions = L.Evented.extend({
|
||||
options: {
|
||||
shortcut: {
|
||||
switch: 71 // char code for 'g'
|
||||
}
|
||||
switch: 71, // char code for 'g'
|
||||
},
|
||||
},
|
||||
|
||||
initialize: function () {
|
||||
|
|
@ -58,14 +58,14 @@ BR.RoutingOptions = L.Evented.extend({
|
|||
|
||||
return {
|
||||
profile: profile.val(),
|
||||
alternative: alternative.val()
|
||||
alternative: alternative.val(),
|
||||
};
|
||||
},
|
||||
|
||||
setOptions: function (options) {
|
||||
var values = [
|
||||
options.profile ? options.profile : $('#profile option:selected').val(),
|
||||
options.alternative ? options.alternative : $('#alternative option:selected').val()
|
||||
options.alternative ? options.alternative : $('#alternative option:selected').val(),
|
||||
];
|
||||
$('.selectpicker').selectpicker('val', values);
|
||||
this.refreshUI();
|
||||
|
|
@ -125,5 +125,5 @@ BR.RoutingOptions = L.Evented.extend({
|
|||
$('#profile-alternative-form button').click();
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
});
|
||||
|
|
|
|||
|
|
@ -20,8 +20,8 @@ BR.TrackAnalysis = L.Class.extend({
|
|||
opacity: 0.8,
|
||||
weight: 8,
|
||||
// show above quality coding (pane defined in RoutingPathQuality.js)
|
||||
pane: 'routingQualityPane'
|
||||
}
|
||||
pane: 'routingQualityPane',
|
||||
},
|
||||
},
|
||||
|
||||
/**
|
||||
|
|
@ -125,7 +125,7 @@ BR.TrackAnalysis = L.Class.extend({
|
|||
var analysis = {
|
||||
highway: {},
|
||||
surface: {},
|
||||
smoothness: {}
|
||||
smoothness: {},
|
||||
};
|
||||
|
||||
this.totalRouteDistance = 0.0;
|
||||
|
|
@ -158,7 +158,7 @@ BR.TrackAnalysis = L.Class.extend({
|
|||
),
|
||||
name: wayTagParts[1],
|
||||
subtype: trackType,
|
||||
distance: 0.0
|
||||
distance: 0.0,
|
||||
};
|
||||
}
|
||||
analysis.highway[highwayType].distance += parseFloat(
|
||||
|
|
@ -175,7 +175,7 @@ BR.TrackAnalysis = L.Class.extend({
|
|||
),
|
||||
name: wayTagParts[1],
|
||||
subtype: '',
|
||||
distance: 0.0
|
||||
distance: 0.0,
|
||||
};
|
||||
}
|
||||
analysis[wayTagParts[0]][wayTagParts[1]].distance += parseFloat(
|
||||
|
|
@ -388,9 +388,7 @@ BR.TrackAnalysis = L.Class.extend({
|
|||
|
||||
toggleSelected: function (event) {
|
||||
var tableRow = event.currentTarget;
|
||||
var $table = $(tableRow)
|
||||
.parents('table')
|
||||
.first();
|
||||
var $table = $(tableRow).parents('table').first();
|
||||
var dataType = $table.data('type');
|
||||
var dataName = $(tableRow).data('name');
|
||||
var trackType = $(tableRow).data('subtype');
|
||||
|
|
@ -512,5 +510,5 @@ BR.TrackAnalysis = L.Class.extend({
|
|||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
},
|
||||
});
|
||||
|
|
|
|||
|
|
@ -5,10 +5,10 @@ BR.TrackMessages = L.Class.extend({
|
|||
opacity: 0.8,
|
||||
weight: 8,
|
||||
// show above quality coding (pane defined in RoutingPathQuality.js)
|
||||
pane: 'routingQualityPane'
|
||||
pane: 'routingQualityPane',
|
||||
},
|
||||
// center hovered edge (way segment) on map
|
||||
syncMap: true
|
||||
syncMap: true,
|
||||
},
|
||||
|
||||
// true when tab is shown, false when hidden
|
||||
|
|
@ -23,7 +23,7 @@ BR.TrackMessages = L.Class.extend({
|
|||
ElevCost: { title: 'elev$', className: 'dt-body-right' },
|
||||
TurnCost: { title: 'turn$', className: 'dt-body-right' },
|
||||
NodeCost: { title: 'node$', className: 'dt-body-right' },
|
||||
InitialCost: { title: 'initial$', className: 'dt-body-right' }
|
||||
InitialCost: { title: 'initial$', className: 'dt-body-right' },
|
||||
},
|
||||
|
||||
/**
|
||||
|
|
@ -89,7 +89,7 @@ BR.TrackMessages = L.Class.extend({
|
|||
// (^= minimum height with flexbox?)
|
||||
scrollY: 50,
|
||||
scrollX: true,
|
||||
order: []
|
||||
order: [],
|
||||
});
|
||||
|
||||
// highlight track segment (graph edge) on row hover
|
||||
|
|
@ -112,9 +112,7 @@ BR.TrackMessages = L.Class.extend({
|
|||
|
||||
if ($.fn.DataTable.isDataTable('#datatable')) {
|
||||
// destroy option too slow on update, really remove elements with destroy method
|
||||
$('#datatable')
|
||||
.DataTable()
|
||||
.destroy(true);
|
||||
$('#datatable').DataTable().destroy(true);
|
||||
|
||||
// recreate original table element, destroy removes all
|
||||
ele = document.createElement('table');
|
||||
|
|
@ -135,7 +133,7 @@ BR.TrackMessages = L.Class.extend({
|
|||
for (k = 0; k < headings.length; k++) {
|
||||
defaultOptions = {
|
||||
title: headings[k],
|
||||
visible: !emptyColumns[k]
|
||||
visible: !emptyColumns[k],
|
||||
};
|
||||
options = L.extend(defaultOptions, this.columnOptions[headings[k]]);
|
||||
columns.push(options);
|
||||
|
|
@ -210,5 +208,5 @@ BR.TrackMessages = L.Class.extend({
|
|||
|
||||
button.classList.toggle('active');
|
||||
this.options.syncMap = !this.options.syncMap;
|
||||
}
|
||||
},
|
||||
});
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ BR.TrackStats = L.Class.extend({
|
|||
var stats = this.calcStats(polyline, segments),
|
||||
length1 = L.Util.formatNum(stats.trackLength / 1000, 1).toLocaleString(),
|
||||
length3 = L.Util.formatNum(stats.trackLength / 1000, 3).toLocaleString(undefined, {
|
||||
minimumFractionDigits: 3
|
||||
minimumFractionDigits: 3,
|
||||
}),
|
||||
formattedAscend = stats.filteredAscend.toLocaleString(),
|
||||
formattedPlainAscend = stats.plainAscend.toLocaleString(),
|
||||
|
|
@ -46,7 +46,7 @@ BR.TrackStats = L.Class.extend({
|
|||
plainAscend: 0,
|
||||
totalTime: 0,
|
||||
totalEnergy: 0,
|
||||
cost: 0
|
||||
cost: 0,
|
||||
};
|
||||
var i, props;
|
||||
|
||||
|
|
@ -61,5 +61,5 @@ BR.TrackStats = L.Class.extend({
|
|||
}
|
||||
|
||||
return stats;
|
||||
}
|
||||
},
|
||||
});
|
||||
|
|
|
|||
113
js/index.js
113
js/index.js
|
|
@ -34,6 +34,7 @@
|
|||
drawButton,
|
||||
deleteRouteButton,
|
||||
pois,
|
||||
circlego,
|
||||
urlHash;
|
||||
|
||||
// By default bootstrap-select use glyphicons
|
||||
|
|
@ -41,14 +42,14 @@
|
|||
iconBase: 'fa',
|
||||
tickIcon: 'fa-check',
|
||||
// don't overlap with footer
|
||||
windowPadding: [0, 0, 40, 0]
|
||||
windowPadding: [0, 0, 40, 0],
|
||||
});
|
||||
|
||||
search = new BR.Search();
|
||||
map.addControl(search);
|
||||
$('#map .leaflet-control-geocoder > button')[0].title = i18next.t('keyboard.generic-shortcut', {
|
||||
action: '$t(map.geocoder)',
|
||||
key: 'F'
|
||||
key: 'F',
|
||||
});
|
||||
|
||||
router = L.bRouter(); //brouterCgi dummyRouter
|
||||
|
|
@ -64,8 +65,8 @@
|
|||
},
|
||||
title: i18next.t('keyboard.generic-shortcut', {
|
||||
action: '$t(map.draw-route-stop)',
|
||||
key: '$t(keyboard.escape)'
|
||||
})
|
||||
key: '$t(keyboard.escape)',
|
||||
}),
|
||||
},
|
||||
{
|
||||
stateName: 'activate-draw',
|
||||
|
|
@ -74,9 +75,12 @@
|
|||
routing.draw(true);
|
||||
control.state('deactivate-draw');
|
||||
},
|
||||
title: i18next.t('keyboard.generic-shortcut', { action: '$t(map.draw-route-start)', key: 'D' })
|
||||
}
|
||||
]
|
||||
title: i18next.t('keyboard.generic-shortcut', {
|
||||
action: '$t(map.draw-route-start)',
|
||||
key: 'D',
|
||||
}),
|
||||
},
|
||||
],
|
||||
});
|
||||
|
||||
var reverseRouteButton = L.easyButton(
|
||||
|
|
@ -84,7 +88,10 @@
|
|||
function () {
|
||||
routing.reverse();
|
||||
},
|
||||
i18next.t('keyboard.generic-shortcut', { action: '$t(map.reverse-route)', key: 'R' })
|
||||
i18next.t('keyboard.generic-shortcut', {
|
||||
action: '$t(map.reverse-route)',
|
||||
key: 'R',
|
||||
})
|
||||
);
|
||||
|
||||
var deletePointButton = L.easyButton(
|
||||
|
|
@ -92,7 +99,10 @@
|
|||
function () {
|
||||
routing.deleteLastPoint();
|
||||
},
|
||||
i18next.t('keyboard.generic-shortcut', { action: '$t(map.delete-last-point)', key: 'Z' })
|
||||
i18next.t('keyboard.generic-shortcut', {
|
||||
action: '$t(map.delete-last-point)',
|
||||
key: 'Z',
|
||||
})
|
||||
);
|
||||
|
||||
deleteRouteButton = L.easyButton(
|
||||
|
|
@ -100,7 +110,10 @@
|
|||
function () {
|
||||
clearRoute();
|
||||
},
|
||||
i18next.t('keyboard.generic-shortcut', { action: '$t(map.clear-route)', key: '$t(keyboard.backspace)' })
|
||||
i18next.t('keyboard.generic-shortcut', {
|
||||
action: '$t(map.clear-route)',
|
||||
key: '$t(keyboard.backspace)',
|
||||
})
|
||||
);
|
||||
|
||||
L.DomEvent.addListener(
|
||||
|
|
@ -128,16 +141,16 @@
|
|||
inputOptions: [
|
||||
{
|
||||
text: i18next.t('map.delete-route'),
|
||||
value: 'route'
|
||||
value: 'route',
|
||||
},
|
||||
{
|
||||
text: i18next.t('map.delete-nogo-areas'),
|
||||
value: 'nogo'
|
||||
value: 'nogo',
|
||||
},
|
||||
{
|
||||
text: i18next.t('map.delete-pois'),
|
||||
value: 'pois'
|
||||
}
|
||||
value: 'pois',
|
||||
},
|
||||
],
|
||||
value: ['route'],
|
||||
callback: function (result) {
|
||||
|
|
@ -154,7 +167,7 @@
|
|||
onUpdate();
|
||||
urlHash.onMapMove();
|
||||
}
|
||||
}
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
|
|
@ -181,10 +194,13 @@
|
|||
profile.update(evt.options);
|
||||
});
|
||||
|
||||
BR.NogoAreas.MSG_BUTTON = i18next.t('keyboard.generic-shortcut', { action: '$t(map.nogo.draw)', key: 'N' });
|
||||
BR.NogoAreas.MSG_BUTTON = i18next.t('keyboard.generic-shortcut', {
|
||||
action: '$t(map.nogo.draw)',
|
||||
key: 'N',
|
||||
});
|
||||
BR.NogoAreas.MSG_BUTTON_CANCEL = i18next.t('keyboard.generic-shortcut', {
|
||||
action: '$t(map.nogo.cancel)',
|
||||
key: '$t(keyboard.escape)'
|
||||
key: '$t(keyboard.escape)',
|
||||
});
|
||||
BR.NogoAreas.MSG_CREATE = i18next.t('map.nogo.click-drag');
|
||||
BR.NogoAreas.MSG_DISABLED = i18next.t('map.nogo.edit');
|
||||
|
|
@ -209,7 +225,7 @@
|
|||
if (!err) {
|
||||
routingOptions.setCustomProfile(profileId, true);
|
||||
updateRoute({
|
||||
options: routingOptions.getOptions()
|
||||
options: routingOptions.getOptions(),
|
||||
});
|
||||
} else {
|
||||
profile.message.showError(err);
|
||||
|
|
@ -229,24 +245,22 @@
|
|||
routingOptions.setCustomProfile(null);
|
||||
});
|
||||
trackMessages = new BR.TrackMessages(map, {
|
||||
requestUpdate: requestUpdate
|
||||
requestUpdate: requestUpdate,
|
||||
});
|
||||
trackAnalysis = new BR.TrackAnalysis(map, {
|
||||
requestUpdate: requestUpdate
|
||||
requestUpdate: requestUpdate,
|
||||
});
|
||||
|
||||
routingPathQuality = new BR.RoutingPathQuality(map, layersControl);
|
||||
|
||||
routing = new BR.Routing({
|
||||
routing: {
|
||||
router: L.bind(router.getRouteSegment, router)
|
||||
router: L.bind(router.getRouteSegment, router),
|
||||
},
|
||||
styles: BR.conf.routingStyles
|
||||
styles: BR.conf.routingStyles,
|
||||
});
|
||||
|
||||
pois = new BR.PoiMarkers({
|
||||
routing: routing
|
||||
});
|
||||
pois = new BR.PoiMarkers(routing);
|
||||
|
||||
exportRoute = new BR.Export(router, pois);
|
||||
|
||||
|
|
@ -298,15 +312,34 @@
|
|||
listeningTabs: {
|
||||
tab_profile: profile,
|
||||
tab_data: trackMessages,
|
||||
tab_analysis: trackAnalysis
|
||||
}
|
||||
tab_analysis: trackAnalysis,
|
||||
},
|
||||
}).addTo(map);
|
||||
if (BR.conf.transit) {
|
||||
sidebar.showPanel('tab_itinerary');
|
||||
}
|
||||
|
||||
nogos.addTo(map);
|
||||
L.easyBar([drawButton, reverseRouteButton, nogos.getButton(), deletePointButton, deleteRouteButton]).addTo(map);
|
||||
|
||||
var circlegoRadius = null;
|
||||
var lang = i18next.languages.length && i18next.languages[0];
|
||||
|
||||
if (lang.startsWith('fr')) {
|
||||
circlegoRadius = 20000;
|
||||
}
|
||||
|
||||
if (circlegoRadius != null) {
|
||||
circlego = new BR.CircleGoArea(routing, nogos, pois);
|
||||
circlego.options.radius = circlegoRadius;
|
||||
pois.circlego = circlego;
|
||||
circlego.addTo(map);
|
||||
}
|
||||
|
||||
var buttons = [drawButton, reverseRouteButton, nogos.getButton()];
|
||||
if (circlegoRadius) buttons.push(circlego.getButton());
|
||||
buttons.push(deletePointButton, deleteRouteButton);
|
||||
|
||||
L.easyBar(buttons).addTo(map);
|
||||
nogos.preventRoutePointOnCreate(routing);
|
||||
|
||||
if (BR.keys.strava) {
|
||||
|
|
@ -323,9 +356,12 @@
|
|||
map.addControl(
|
||||
new BR.OpacitySliderControl({
|
||||
id: 'route',
|
||||
title: i18next.t('map.opacity-slider-shortcut', { action: '$t(map.opacity-slider)', key: 'M' }),
|
||||
title: i18next.t('map.opacity-slider-shortcut', {
|
||||
action: '$t(map.opacity-slider)',
|
||||
key: 'M',
|
||||
}),
|
||||
muteKeyCode: 77, // m
|
||||
callback: L.bind(routing.setOpacity, routing)
|
||||
callback: L.bind(routing.setOpacity, routing),
|
||||
})
|
||||
);
|
||||
|
||||
|
|
@ -367,10 +403,13 @@
|
|||
routing.clear();
|
||||
routing.setWaypoints(opts.lonlats);
|
||||
}
|
||||
|
||||
if (opts.pois) {
|
||||
pois.setMarkers(opts.pois);
|
||||
}
|
||||
if (circlego && opts.circlego) {
|
||||
circlego.options.radius = opts.circlego[2];
|
||||
circlego.setCircle([opts.circlego[0], opts.circlego[1]], opts.polylines != null);
|
||||
}
|
||||
};
|
||||
|
||||
var onInvalidHashChangeCb = function (params) {
|
||||
|
|
@ -385,7 +424,9 @@
|
|||
urlHash = new L.Hash(null, null);
|
||||
// this callback is used to append anything in URL after L.Hash wrote #map=zoom/lat/lng/layer
|
||||
urlHash.additionalCb = function () {
|
||||
var url = router.getUrl(routing.getWaypoints(), pois.getMarkers(), null).substr('brouter?'.length + 1);
|
||||
var url = router
|
||||
.getUrl(routing.getWaypoints(), pois.getMarkers(), circlego ? circlego.getCircle() : null, null)
|
||||
.substr('brouter?'.length + 1);
|
||||
|
||||
// by default brouter use | as separator. To make URL more human-readable, we remplace them with ; for users
|
||||
url = url.replace(/\|/g, ';');
|
||||
|
|
@ -395,7 +436,7 @@
|
|||
urlHash.onHashChangeCb = onHashChangeCb;
|
||||
urlHash.onInvalidHashChangeCb = onInvalidHashChangeCb;
|
||||
urlHash.init(map, {
|
||||
layersControl: layersControl
|
||||
layersControl: layersControl,
|
||||
});
|
||||
|
||||
// activate configured default base layer or first if no hash,
|
||||
|
|
@ -445,14 +486,14 @@
|
|||
{
|
||||
fallbackLng: 'en',
|
||||
backend: {
|
||||
loadPath: 'dist/locales/{{lng}}.json'
|
||||
}
|
||||
loadPath: 'dist/locales/{{lng}}.json',
|
||||
},
|
||||
},
|
||||
function (err, t) {
|
||||
jqueryI18next.init(i18next, $, { useOptionsAttr: true });
|
||||
$('html').localize();
|
||||
$('#aboutLinks').localize({
|
||||
privacyPolicyUrl: BR.conf.privacyPolicyUrl || 'https://brouter.de/privacypolicy.html'
|
||||
privacyPolicyUrl: BR.conf.privacyPolicyUrl || 'https://brouter.de/privacypolicy.html',
|
||||
});
|
||||
|
||||
mapContext = BR.Map.initMap();
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ BR.BingLayer = L.BingLayer.extend({
|
|||
maxZoom: 19,
|
||||
attribution:
|
||||
'<a target="_blank" href="https://www.bing.com/maps/">Bing Maps</a>' +
|
||||
' (<a target="_blank" href="https://go.microsoft.com/?linkid=9710837">TOU</a>)'
|
||||
' (<a target="_blank" href="https://go.microsoft.com/?linkid=9710837">TOU</a>)',
|
||||
},
|
||||
|
||||
initialize: function (key, options) {
|
||||
|
|
@ -26,5 +26,5 @@ BR.BingLayer = L.BingLayer.extend({
|
|||
onRemove: function (map) {
|
||||
L.BingLayer.prototype.onRemove.call(this, map);
|
||||
map.removeControl(this._logo);
|
||||
}
|
||||
},
|
||||
});
|
||||
|
|
|
|||
248
js/plugin/CircleGoArea.js
Normal file
248
js/plugin/CircleGoArea.js
Normal file
|
|
@ -0,0 +1,248 @@
|
|||
BR.CircleGoArea = L.Control.extend({
|
||||
circleLayer: null,
|
||||
outsideAreaRenderer: L.svg({ padding: 1 }),
|
||||
|
||||
options: {
|
||||
radius: 1000, // in meters
|
||||
shortcut: {
|
||||
draw: {
|
||||
enable: 73, // char code for 'i'
|
||||
disable: 27, // char code for 'ESC'
|
||||
},
|
||||
},
|
||||
},
|
||||
initialize: function (routing, nogos, pois) {
|
||||
this.routing = routing;
|
||||
this.nogos = nogos;
|
||||
this.pois = pois;
|
||||
},
|
||||
|
||||
onAdd: function (map) {
|
||||
var self = this;
|
||||
|
||||
this.map = map;
|
||||
this.circleLayer = L.layerGroup([]).addTo(map);
|
||||
|
||||
var radiusKm = (this.options.radius / 1000).toFixed();
|
||||
this.drawButton = L.easyButton({
|
||||
states: [
|
||||
{
|
||||
stateName: 'activate-circlego',
|
||||
icon: 'fa-circle-o',
|
||||
onClick: function () {
|
||||
self.draw(true);
|
||||
},
|
||||
title: i18next.t('keyboard.generic-shortcut', {
|
||||
action: i18next.t('map.draw-circlego-start', { radius: radiusKm }),
|
||||
key: 'I',
|
||||
}),
|
||||
},
|
||||
{
|
||||
stateName: 'deactivate-circlego',
|
||||
icon: 'fa-circle-o active',
|
||||
onClick: function () {
|
||||
self.draw(false);
|
||||
},
|
||||
title: i18next.t('keyboard.generic-shortcut', {
|
||||
action: i18next.t('map.draw-circlego-stop', { radius: radiusKm }),
|
||||
key: '$t(keyboard.escape)',
|
||||
}),
|
||||
},
|
||||
],
|
||||
});
|
||||
|
||||
map.on('routing:draw-start', function () {
|
||||
self.draw(false);
|
||||
});
|
||||
|
||||
L.DomEvent.addListener(document, 'keydown', this._keydownListener, this);
|
||||
|
||||
var container = new L.DomUtil.create('div');
|
||||
return container;
|
||||
},
|
||||
|
||||
draw: function (enable) {
|
||||
this.drawButton.state(enable ? 'deactivate-circlego' : 'activate-circlego');
|
||||
if (enable) {
|
||||
this.routing.draw(false);
|
||||
this.pois.draw(false);
|
||||
this.map.on('click', this.onMapClick, this);
|
||||
L.DomUtil.addClass(this.map.getContainer(), 'circlego-draw-enabled');
|
||||
} else {
|
||||
this.map.off('click', this.onMapClick, this);
|
||||
L.DomUtil.removeClass(this.map.getContainer(), 'circlego-draw-enabled');
|
||||
}
|
||||
},
|
||||
|
||||
_keydownListener: function (e) {
|
||||
if (!BR.Util.keyboardShortcutsAllowed(e)) {
|
||||
return;
|
||||
}
|
||||
if (e.keyCode === this.options.shortcut.draw.disable) {
|
||||
this.draw(false);
|
||||
} else if (e.keyCode === this.options.shortcut.draw.enable) {
|
||||
this.draw(true);
|
||||
}
|
||||
},
|
||||
|
||||
setNogoCircle: function (center) {
|
||||
if (center) {
|
||||
var polygon = this.circleToPolygon(center, this.options.radius);
|
||||
var geoJson = JSON.stringify(polygon);
|
||||
$('#nogoJSON').val(geoJson);
|
||||
$('#nogoBuffer').val(0);
|
||||
this.nogos.uploadNogos();
|
||||
|
||||
var polygonClone = JSON.parse(geoJson);
|
||||
this.setOutsideArea(polygonClone);
|
||||
} else {
|
||||
this.nogos.clear();
|
||||
this.map.removeLayer(this.outsideArea);
|
||||
}
|
||||
},
|
||||
|
||||
setOutsideArea: function (polygon) {
|
||||
var inner = polygon.features[0].geometry.coordinates.concat(polygon.features[1].geometry.coordinates);
|
||||
var world = [
|
||||
[180, 90],
|
||||
[-180, 90],
|
||||
[-180, -90],
|
||||
[180, -90],
|
||||
[180, 90],
|
||||
];
|
||||
polygon.features[0].geometry.coordinates = [world, inner];
|
||||
polygon.features[0].geometry.type = 'Polygon';
|
||||
polygon.features.pop();
|
||||
|
||||
if (this.outsideArea) {
|
||||
this.map.removeLayer(this.outsideArea);
|
||||
}
|
||||
|
||||
this.outsideArea = L.geoJson(polygon, {
|
||||
renderer: this.outsideAreaRenderer,
|
||||
style: function (feature) {
|
||||
return {
|
||||
weight: 2,
|
||||
color: 'black',
|
||||
opacity: 0.4,
|
||||
fillColor: 'black',
|
||||
fillOpacity: 0.4,
|
||||
className: 'circlego-outside',
|
||||
};
|
||||
},
|
||||
})
|
||||
.on('click', L.DomEvent.stop)
|
||||
.addTo(this.map);
|
||||
},
|
||||
|
||||
onMapClick: function (e) {
|
||||
this.setCircle([e.latlng.lng, e.latlng.lat], false);
|
||||
},
|
||||
|
||||
setCircle: function (center, skipNogo) {
|
||||
var self = this;
|
||||
var icon = L.VectorMarkers.icon({
|
||||
icon: 'home',
|
||||
markerColor: BR.conf.markerColors.circlego,
|
||||
});
|
||||
var marker = L.marker([center[1], center[0]], { icon: icon, draggable: true, name: name })
|
||||
.on('dragend', function (e) {
|
||||
self.setNogoCircle([e.target.getLatLng().lng, e.target.getLatLng().lat]);
|
||||
})
|
||||
.on('click', function () {
|
||||
var drawing = self.drawButton.state() == 'deactivate-circlego';
|
||||
if (drawing) {
|
||||
self.circleLayer.removeLayer(marker);
|
||||
self.setNogoCircle(undefined);
|
||||
}
|
||||
});
|
||||
|
||||
this.clear();
|
||||
marker.addTo(this.circleLayer);
|
||||
if (!skipNogo) {
|
||||
this.setNogoCircle(center);
|
||||
} else {
|
||||
var polygon = this.circleToPolygon(center, this.options.radius);
|
||||
this.setOutsideArea(polygon);
|
||||
}
|
||||
this.draw(false);
|
||||
},
|
||||
|
||||
clear: function () {
|
||||
this.circleLayer.clearLayers();
|
||||
},
|
||||
|
||||
getButton: function () {
|
||||
return this.drawButton;
|
||||
},
|
||||
|
||||
getCircle: function () {
|
||||
var circle = this.circleLayer.getLayers().map(function (it) {
|
||||
return it.getLatLng();
|
||||
});
|
||||
if (circle && circle.length) {
|
||||
return [circle[0].lng.toFixed(6), circle[0].lat.toFixed(6), this.options.radius].join(',');
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
},
|
||||
|
||||
toRadians: function (angleInDegrees) {
|
||||
return (angleInDegrees * Math.PI) / 180;
|
||||
},
|
||||
|
||||
toDegrees: function (angleInRadians) {
|
||||
return (angleInRadians * 180) / Math.PI;
|
||||
},
|
||||
|
||||
offset: function (c1, distance, bearing) {
|
||||
var lon1 = this.toRadians(c1[0]);
|
||||
var lat1 = this.toRadians(c1[1]);
|
||||
var dByR = distance / 6378137; // distance divided by 6378137 (radius of the earth) wgs84
|
||||
var lat = Math.asin(Math.sin(lat1) * Math.cos(dByR) + Math.cos(lat1) * Math.sin(dByR) * Math.cos(bearing));
|
||||
var lon =
|
||||
lon1 +
|
||||
Math.atan2(
|
||||
Math.sin(bearing) * Math.sin(dByR) * Math.cos(lat1),
|
||||
Math.cos(dByR) - Math.sin(lat1) * Math.sin(lat)
|
||||
);
|
||||
return [this.toDegrees(lon), this.toDegrees(lat)];
|
||||
},
|
||||
|
||||
circleToPolygon: function (center, radius, numberOfSegments) {
|
||||
var n = numberOfSegments ? numberOfSegments : 32;
|
||||
|
||||
var inner = [];
|
||||
for (var i = 0; i < n; ++i) {
|
||||
inner.push(this.offset(center, radius, (2 * Math.PI * -i) / n));
|
||||
}
|
||||
inner.push(inner[0]);
|
||||
|
||||
/* hack: it seems there is a bug when using a single closed ring line,
|
||||
cf. https://github.com/nrenner/brouter-web/issues/349#issue-755514458
|
||||
so instead we use 2 half rings to ensure we properly close the area */
|
||||
return {
|
||||
type: 'FeatureCollection',
|
||||
features: [
|
||||
{
|
||||
type: 'Feature',
|
||||
properties: {},
|
||||
geometry: {
|
||||
type: 'LineString',
|
||||
coordinates: inner.slice(n / 2 - 1),
|
||||
},
|
||||
},
|
||||
{
|
||||
type: 'Feature',
|
||||
properties: {},
|
||||
geometry: {
|
||||
type: 'LineString',
|
||||
coordinates: inner.slice(0, n / 2 + 1),
|
||||
},
|
||||
},
|
||||
],
|
||||
};
|
||||
},
|
||||
});
|
||||
|
||||
BR.CircleGoArea.include(L.Evented.prototype);
|
||||
|
|
@ -6,61 +6,61 @@ BR.Heightgraph = function(map, layersControl, routing, pois) {
|
|||
top: 15,
|
||||
right: 30,
|
||||
bottom: 30,
|
||||
left: 70
|
||||
left: 70,
|
||||
},
|
||||
expandControls: false,
|
||||
mappings: {
|
||||
gradient: {
|
||||
'-5': {
|
||||
text: '- 16%+',
|
||||
color: '#028306'
|
||||
color: '#028306',
|
||||
},
|
||||
'-4': {
|
||||
text: '- 10-15%',
|
||||
color: '#2AA12E'
|
||||
color: '#2AA12E',
|
||||
},
|
||||
'-3': {
|
||||
text: '- 7-9%',
|
||||
color: '#53BF56'
|
||||
color: '#53BF56',
|
||||
},
|
||||
'-2': {
|
||||
text: '- 4-6%',
|
||||
color: '#7BDD7E'
|
||||
color: '#7BDD7E',
|
||||
},
|
||||
'-1': {
|
||||
text: '- 1-3%',
|
||||
color: '#A4FBA6'
|
||||
color: '#A4FBA6',
|
||||
},
|
||||
'0': {
|
||||
0: {
|
||||
text: '0%',
|
||||
color: '#ffcc99'
|
||||
color: '#ffcc99',
|
||||
},
|
||||
'1': {
|
||||
1: {
|
||||
text: '1-3%',
|
||||
color: '#F29898'
|
||||
color: '#F29898',
|
||||
},
|
||||
'2': {
|
||||
2: {
|
||||
text: '4-6%',
|
||||
color: '#E07575'
|
||||
color: '#E07575',
|
||||
},
|
||||
'3': {
|
||||
3: {
|
||||
text: '7-9%',
|
||||
color: '#CF5352'
|
||||
color: '#CF5352',
|
||||
},
|
||||
'4': {
|
||||
4: {
|
||||
text: '10-15%',
|
||||
color: '#BE312F'
|
||||
color: '#BE312F',
|
||||
},
|
||||
'5': {
|
||||
5: {
|
||||
text: '16%+',
|
||||
color: '#AD0F0C'
|
||||
}
|
||||
}
|
||||
color: '#AD0F0C',
|
||||
},
|
||||
},
|
||||
},
|
||||
// extra options
|
||||
shortcut: {
|
||||
toggle: 69 // char code for 'e'
|
||||
}
|
||||
toggle: 69, // char code for 'e'
|
||||
},
|
||||
},
|
||||
|
||||
addBelow: function (map) {
|
||||
|
|
@ -94,7 +94,7 @@ BR.Heightgraph = function(map, layersControl, routing, pois) {
|
|||
if (container.is(':visible')) {
|
||||
self.resize({
|
||||
width: container.width(),
|
||||
height: container.height()
|
||||
height: container.height(),
|
||||
});
|
||||
}
|
||||
});
|
||||
|
|
@ -106,7 +106,7 @@ BR.Heightgraph = function(map, layersControl, routing, pois) {
|
|||
container.on('shown.bs.collapse', function () {
|
||||
self.resize({
|
||||
width: container.width(),
|
||||
height: container.height()
|
||||
height: container.height(),
|
||||
});
|
||||
});
|
||||
|
||||
|
|
@ -186,7 +186,7 @@ BR.Heightgraph = function(map, layersControl, routing, pois) {
|
|||
}
|
||||
$('#elevation-chart').collapse('hide');
|
||||
}
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
var heightgraphControl = new Heightgraph();
|
||||
|
|
|
|||
|
|
@ -3,9 +3,9 @@ BR.NogoAreas = L.Control.extend({
|
|||
shortcut: {
|
||||
draw: {
|
||||
enable: 78, // char code for 'n'
|
||||
disable: 27 // char code for 'ESC'
|
||||
}
|
||||
}
|
||||
disable: 27, // char code for 'ESC'
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
statics: {
|
||||
|
|
@ -16,7 +16,7 @@ BR.NogoAreas = L.Control.extend({
|
|||
MSG_ENABLED:
|
||||
'□ = move / resize, <span class="fa fa-trash-o"></span> = delete,<br>click nogo to quit editing',
|
||||
STATE_CREATE: 'no-go-create',
|
||||
STATE_CANCEL: 'cancel-no-go-create'
|
||||
STATE_CANCEL: 'cancel-no-go-create',
|
||||
},
|
||||
|
||||
style: {
|
||||
|
|
@ -25,14 +25,14 @@ BR.NogoAreas = L.Control.extend({
|
|||
opacity: 0.5,
|
||||
fillColor: null, //same as color by default
|
||||
fillOpacity: 0.2,
|
||||
dashArray: null
|
||||
dashArray: null,
|
||||
},
|
||||
|
||||
editStyle: {
|
||||
color: '#fe57a1',
|
||||
opacity: 0.6,
|
||||
dashArray: '10, 10',
|
||||
fillOpacity: 0.1
|
||||
fillOpacity: 0.1,
|
||||
},
|
||||
|
||||
initialize: function () {
|
||||
|
|
@ -54,7 +54,7 @@ BR.NogoAreas = L.Control.extend({
|
|||
circleEditorClass: BR.DeletableCircleEditor,
|
||||
// FeatureGroup instead of LayerGroup to propagate events to members
|
||||
editLayer: new L.FeatureGroup().addTo(map),
|
||||
featuresLayer: this.drawnItems
|
||||
featuresLayer: this.drawnItems,
|
||||
}));
|
||||
|
||||
this.startDrawing = function (control) {
|
||||
|
|
@ -76,15 +76,15 @@ BR.NogoAreas = L.Control.extend({
|
|||
stateName: BR.NogoAreas.STATE_CREATE,
|
||||
icon: 'fa-ban',
|
||||
title: BR.NogoAreas.MSG_BUTTON,
|
||||
onClick: this.startDrawing
|
||||
onClick: this.startDrawing,
|
||||
},
|
||||
{
|
||||
stateName: BR.NogoAreas.STATE_CANCEL,
|
||||
icon: 'fa-ban active',
|
||||
title: BR.NogoAreas.MSG_BUTTON_CANCEL,
|
||||
onClick: this.stopDrawing
|
||||
}
|
||||
]
|
||||
onClick: this.stopDrawing,
|
||||
},
|
||||
],
|
||||
});
|
||||
|
||||
// prevent instant re-activate when turning off button by both Pointer and Click
|
||||
|
|
@ -162,9 +162,13 @@ BR.NogoAreas = L.Control.extend({
|
|||
var self = this;
|
||||
|
||||
var geoJSONPromise;
|
||||
var nogoJSON = $('#nogoJSON').val(); //hidden
|
||||
var nogoURL = $('#nogoURL').val();
|
||||
var nogoFile = $('#nogoFile')[0].files[0];
|
||||
if (nogoURL) {
|
||||
if (nogoJSON) {
|
||||
geoJSONPromise = Promise.resolve(JSON.parse(nogoJSON));
|
||||
$('#nogoJSON').val(undefined);
|
||||
} else if (nogoURL) {
|
||||
// TODO: Handle {{bbox}}
|
||||
geoJSONPromise = fetch(nogoURL).then(function (response) {
|
||||
response.json();
|
||||
|
|
@ -229,7 +233,7 @@ BR.NogoAreas = L.Control.extend({
|
|||
var geoJSON = L.geoJson(turf.featureCollection(cleanedGeoJSONFeatures), {
|
||||
onEachFeature: function (feature, layer) {
|
||||
layer.options.nogoWeight = feature.properties.nogoWeight || nogoWeight;
|
||||
}
|
||||
},
|
||||
});
|
||||
var nogosPoints = geoJSON.getLayers().filter(function (e) {
|
||||
return e.feature.geometry.type === 'Point';
|
||||
|
|
@ -251,7 +255,7 @@ BR.NogoAreas = L.Control.extend({
|
|||
}),
|
||||
polylines: geoJSON.getLayers().filter(function (e) {
|
||||
return e.feature.geometry.type === 'LineString';
|
||||
})
|
||||
}),
|
||||
});
|
||||
self._fireUpdate();
|
||||
self.displayUploadError(undefined);
|
||||
|
|
@ -295,7 +299,7 @@ BR.NogoAreas = L.Control.extend({
|
|||
}),
|
||||
polylines: this.drawnItems.getLayers().filter(function (e) {
|
||||
return e instanceof L.Polyline && !(e instanceof L.Polygon);
|
||||
})
|
||||
}),
|
||||
};
|
||||
},
|
||||
|
||||
|
|
@ -347,7 +351,7 @@ BR.NogoAreas = L.Control.extend({
|
|||
|
||||
getButton: function () {
|
||||
return this.button;
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
BR.NogoAreas.include(L.Evented.prototype);
|
||||
|
|
@ -387,12 +391,12 @@ BR.Editable = L.Editable.extend({
|
|||
|
||||
createVertexIcon: function (options) {
|
||||
return BR.Browser.touch ? new L.Editable.TouchVertexIcon(options) : new L.Editable.VertexIcon(options);
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
BR.EditingTooltip = L.Handler.extend({
|
||||
options: {
|
||||
closeTimeout: 2000
|
||||
closeTimeout: 2000,
|
||||
},
|
||||
|
||||
initialize: function (map, editTools, button) {
|
||||
|
|
@ -430,7 +434,7 @@ BR.EditingTooltip = L.Handler.extend({
|
|||
var layer = e.layer;
|
||||
layer.bindTooltip(BR.NogoAreas.MSG_DISABLED, {
|
||||
direction: 'bottom',
|
||||
className: 'editing-tooltip'
|
||||
className: 'editing-tooltip',
|
||||
});
|
||||
|
||||
// Override to set position to south instead of center (circle latlng);
|
||||
|
|
@ -457,7 +461,7 @@ BR.EditingTooltip = L.Handler.extend({
|
|||
// offset wrong with 'auto' when switching direction
|
||||
direction: 'right',
|
||||
offset: L.point(5, 28),
|
||||
className: 'editing-tooltip-create'
|
||||
className: 'editing-tooltip-create',
|
||||
});
|
||||
|
||||
// self-reference hack for _moveTooltip, as tooltip is not bound to layer
|
||||
|
|
@ -532,7 +536,7 @@ BR.EditingTooltip = L.Handler.extend({
|
|||
_disable: function (e) {
|
||||
e.layer.setTooltipContent(BR.NogoAreas.MSG_DISABLED);
|
||||
this._setCloseTimeout(e.layer);
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
BR.DeletableCircleEditor = L.Editable.CircleEditor.extend({
|
||||
|
|
@ -607,7 +611,7 @@ BR.DeletableCircleEditor = L.Editable.CircleEditor.extend({
|
|||
onVertexMarkerDrag: function (e) {
|
||||
this._updateDeleteLatLng();
|
||||
L.Editable.CircleEditor.prototype.onVertexMarkerDrag.call(this, e);
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
BR.DeleteMarker = L.Marker.extend({
|
||||
|
|
@ -615,8 +619,8 @@ BR.DeleteMarker = L.Marker.extend({
|
|||
draggable: false,
|
||||
icon: L.divIcon({
|
||||
iconSize: BR.Browser.touch ? new L.Point(24, 24) : new L.Point(16, 16),
|
||||
className: 'leaflet-div-icon fa fa-trash-o nogo-delete-marker'
|
||||
})
|
||||
className: 'leaflet-div-icon fa fa-trash-o nogo-delete-marker',
|
||||
}),
|
||||
},
|
||||
|
||||
initialize: function (latlng, editor, options) {
|
||||
|
|
@ -649,5 +653,5 @@ BR.DeleteMarker = L.Marker.extend({
|
|||
|
||||
onClick: function (e) {
|
||||
this.editor.delete();
|
||||
}
|
||||
},
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1,14 +1,18 @@
|
|||
BR.PoiMarkers = L.Control.extend({
|
||||
markersLayer: null,
|
||||
circlego: null,
|
||||
|
||||
options: {
|
||||
routing: null,
|
||||
shortcut: {
|
||||
draw: {
|
||||
enable: 80, // char code for 'p'
|
||||
disable: 27 // char code for 'ESC'
|
||||
}
|
||||
}
|
||||
disable: 27, // char code for 'ESC'
|
||||
},
|
||||
},
|
||||
},
|
||||
initialize: function (routing) {
|
||||
this.routing = routing;
|
||||
this.circlego = null;
|
||||
},
|
||||
|
||||
onAdd: function (map) {
|
||||
|
|
@ -25,7 +29,7 @@ BR.PoiMarkers = L.Control.extend({
|
|||
onClick: function () {
|
||||
self.draw(true);
|
||||
},
|
||||
title: i18next.t('keyboard.generic-shortcut', { action: '$t(map.draw-poi-start)', key: 'P' })
|
||||
title: i18next.t('keyboard.generic-shortcut', { action: '$t(map.draw-poi-start)', key: 'P' }),
|
||||
},
|
||||
{
|
||||
stateName: 'deactivate-poi',
|
||||
|
|
@ -35,10 +39,10 @@ BR.PoiMarkers = L.Control.extend({
|
|||
},
|
||||
title: i18next.t('keyboard.generic-shortcut', {
|
||||
action: '$t(map.draw-poi-stop)',
|
||||
key: '$t(keyboard.escape)'
|
||||
})
|
||||
}
|
||||
]
|
||||
key: '$t(keyboard.escape)',
|
||||
}),
|
||||
},
|
||||
],
|
||||
}).addTo(map);
|
||||
|
||||
map.on('routing:draw-start', function () {
|
||||
|
|
@ -54,7 +58,8 @@ BR.PoiMarkers = L.Control.extend({
|
|||
draw: function (enable) {
|
||||
this.drawButton.state(enable ? 'deactivate-poi' : 'activate-poi');
|
||||
if (enable) {
|
||||
this.options.routing.draw(false);
|
||||
this.routing.draw(false);
|
||||
if (this.circlego) this.circlego.draw(false);
|
||||
this.map.on('click', this.onMapClick, this);
|
||||
L.DomUtil.addClass(this.map.getContainer(), 'pois-draw-enabled');
|
||||
} else {
|
||||
|
|
@ -82,14 +87,14 @@ BR.PoiMarkers = L.Control.extend({
|
|||
if (result !== null) {
|
||||
self.addMarker(e.latlng, result);
|
||||
}
|
||||
}
|
||||
},
|
||||
});
|
||||
},
|
||||
|
||||
addMarker: function (latlng, name) {
|
||||
var icon = L.VectorMarkers.icon({
|
||||
icon: 'star',
|
||||
markerColor: BR.conf.markerColors.poi
|
||||
markerColor: BR.conf.markerColors.poi,
|
||||
});
|
||||
|
||||
var content = BR.Util.sanitizeHTMLContent(name) + '<br>';
|
||||
|
|
@ -129,11 +134,11 @@ BR.PoiMarkers = L.Control.extend({
|
|||
getMarkers: function () {
|
||||
return this.markersLayer.getLayers().map(function (it) {
|
||||
return {
|
||||
latlng: it._latlng,
|
||||
name: it.options.name
|
||||
latlng: it.getLatLng(),
|
||||
name: it.options.name,
|
||||
};
|
||||
});
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
BR.PoiMarkers.include(L.Evented.prototype);
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ BR.routeLoader = function(map, layersControl, routing, pois) {
|
|||
showPointAsPoi: true,
|
||||
simplifyTolerance: -1,
|
||||
isTestMode: false,
|
||||
simplifyLastKnownGood: 0.001
|
||||
simplifyLastKnownGood: 0.001,
|
||||
},
|
||||
|
||||
setDialogDraggable: function (jqDlgHeader) {
|
||||
|
|
@ -25,7 +25,7 @@ BR.routeLoader = function(map, layersControl, routing, pois) {
|
|||
$('body').on('mousemove.draggable', function (mousemoveEvt) {
|
||||
$draggable.closest('.modal-dialog').offset({
|
||||
left: mousemoveEvt.pageX - x,
|
||||
top: mousemoveEvt.pageY - y
|
||||
top: mousemoveEvt.pageY - y,
|
||||
});
|
||||
});
|
||||
$('body').one('mouseup', function () {
|
||||
|
|
@ -40,7 +40,7 @@ BR.routeLoader = function(map, layersControl, routing, pois) {
|
|||
getSimplifiedCoords: function (tolerance) {
|
||||
var simplifiedLine = turf.simplify(this._trackPoints.geometry, {
|
||||
tolerance: tolerance,
|
||||
highQuality: true
|
||||
highQuality: true,
|
||||
});
|
||||
return simplifiedLine.coordinates;
|
||||
},
|
||||
|
|
@ -61,7 +61,7 @@ BR.routeLoader = function(map, layersControl, routing, pois) {
|
|||
L.circleMarker(simplifiedLatLngs[i], {
|
||||
radius: 6,
|
||||
fill: false,
|
||||
color: '#FF0000'
|
||||
color: '#FF0000',
|
||||
})
|
||||
);
|
||||
}
|
||||
|
|
@ -89,7 +89,7 @@ BR.routeLoader = function(map, layersControl, routing, pois) {
|
|||
showPointAsPoi: true,
|
||||
simplifyTolerance: -1,
|
||||
isTestMode: false,
|
||||
simplifyLastKnownGood: 0.001
|
||||
simplifyLastKnownGood: 0.001,
|
||||
};
|
||||
},
|
||||
|
||||
|
|
@ -236,9 +236,7 @@ BR.routeLoader = function(map, layersControl, routing, pois) {
|
|||
|
||||
onFileChanged: function (e) {
|
||||
if (!e.target.files[0]) return;
|
||||
$(e.target)
|
||||
.next('label')
|
||||
.text(e.target.files[0].name);
|
||||
$(e.target).next('label').text(e.target.files[0].name);
|
||||
var testmode = this._options.isTestMode;
|
||||
this.cleanup();
|
||||
this._options.isTestMode = testmode;
|
||||
|
|
@ -340,7 +338,7 @@ BR.routeLoader = function(map, layersControl, routing, pois) {
|
|||
var err = event.error;
|
||||
BR.message.showError(
|
||||
i18next.t('warning.tracks-load-error', {
|
||||
error: err && err.message ? err.message : err
|
||||
error: err && err.message ? err.message : err,
|
||||
})
|
||||
);
|
||||
});
|
||||
|
|
@ -383,7 +381,7 @@ BR.routeLoader = function(map, layersControl, routing, pois) {
|
|||
if (!this._options.isTestMode) this.addRoutingPoints();
|
||||
|
||||
this.onBusyChanged(false);
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
RouteLoader.include(L.Evented.prototype);
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ BR.Routing = L.Routing.extend({
|
|||
normal: L.VectorMarkers.icon({ icon: 'circle', markerColor: BR.conf.markerColors.via }),
|
||||
end: L.VectorMarkers.icon({ icon: 'stop', markerColor: BR.conf.markerColors.stop }),
|
||||
draw: false,
|
||||
opacity: 1
|
||||
opacity: 1,
|
||||
},
|
||||
snapping: null,
|
||||
zIndexOffset: -2000,
|
||||
|
|
@ -22,16 +22,16 @@ BR.Routing = L.Routing.extend({
|
|||
offset: 5000,
|
||||
textFunction: function (distance) {
|
||||
return distance / 1000;
|
||||
}
|
||||
},
|
||||
},
|
||||
shortcut: {
|
||||
draw: {
|
||||
enable: 68, // char code for 'd'
|
||||
disable: 27 // char code for 'ESC'
|
||||
disable: 27, // char code for 'ESC'
|
||||
},
|
||||
reverse: 82, // char code for 'r'
|
||||
deleteLastPoint: 90 // char code for 'z'
|
||||
}
|
||||
deleteLastPoint: 90, // char code for 'z'
|
||||
},
|
||||
},
|
||||
|
||||
onAdd: function (map) {
|
||||
|
|
@ -82,7 +82,7 @@ BR.Routing = L.Routing.extend({
|
|||
L.divIcon({
|
||||
className: 'line-mouse-marker',
|
||||
iconAnchor: [8, 8], // size/2 + border/2
|
||||
iconSize: [16, 16]
|
||||
iconSize: [16, 16],
|
||||
})
|
||||
);
|
||||
|
||||
|
|
@ -205,10 +205,10 @@ BR.Routing = L.Routing.extend({
|
|||
this.options.icons.opacity = opacity;
|
||||
|
||||
this._segments.setStyle({
|
||||
opacity: sourceOpacity
|
||||
opacity: sourceOpacity,
|
||||
});
|
||||
this._segmentsCasing.setStyle({
|
||||
opacity: sourceOpacity
|
||||
opacity: sourceOpacity,
|
||||
});
|
||||
this._waypoints.eachLayer(function (marker) {
|
||||
marker.setOpacity(opacity);
|
||||
|
|
@ -327,7 +327,7 @@ BR.Routing = L.Routing.extend({
|
|||
color: this.options.styles.track.color,
|
||||
opacity: this.options.styles.trailer.opacity,
|
||||
dashArray: [10, 10],
|
||||
className: 'loading-trailer'
|
||||
className: 'loading-trailer',
|
||||
});
|
||||
this._loadingTrailerGroup.addLayer(loadingTrailer);
|
||||
}
|
||||
|
|
@ -413,5 +413,5 @@ BR.Routing = L.Routing.extend({
|
|||
this._distanceMarkers = new L.DistanceMarkers(this.toPolyline(), this._map, distanceMarkersOpts);
|
||||
this._map.addLayer(this._distanceMarkers);
|
||||
}
|
||||
}
|
||||
},
|
||||
});
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@ BR.RoutingPathQuality = L.Control.extend({
|
|||
options: {
|
||||
shortcut: {
|
||||
toggle: 67, // char code for 'c'
|
||||
muteKeyCode: 77 // char code for 'm'
|
||||
}
|
||||
muteKeyCode: 77, // char code for 'm'
|
||||
},
|
||||
},
|
||||
|
||||
initialize: function (map, layersControl, options) {
|
||||
|
|
@ -32,10 +32,10 @@ BR.RoutingPathQuality = L.Control.extend({
|
|||
0.25: '#00ffff', // cyan
|
||||
0.5: '#00ff00', // green
|
||||
0.75: '#ffff00', // yellow
|
||||
1.0: '#ff0000' // red
|
||||
1.0: '#ff0000', // red
|
||||
},
|
||||
outlineColor: 'dimgray',
|
||||
renderer: renderer
|
||||
renderer: renderer,
|
||||
},
|
||||
valueFunction: function (latLng, prevLatLng) {
|
||||
var deltaAltitude = latLng.alt - prevLatLng.alt, // in m
|
||||
|
|
@ -44,8 +44,8 @@ BR.RoutingPathQuality = L.Control.extend({
|
|||
return 0;
|
||||
}
|
||||
return (Math.atan(deltaAltitude / distance) * 180) / Math.PI;
|
||||
}
|
||||
})
|
||||
},
|
||||
}),
|
||||
},
|
||||
altitude: {
|
||||
title: i18next.t('map.route-quality-shortcut', { action: '$t(map.route-quality-altitude)', key: 'C' }),
|
||||
|
|
@ -53,12 +53,12 @@ BR.RoutingPathQuality = L.Control.extend({
|
|||
provider: new HotLineQualityProvider({
|
||||
hotlineOptions: {
|
||||
outlineColor: 'dimgray',
|
||||
renderer: renderer
|
||||
renderer: renderer,
|
||||
},
|
||||
valueFunction: function (latLng) {
|
||||
return latLng.alt;
|
||||
}
|
||||
})
|
||||
},
|
||||
}),
|
||||
},
|
||||
cost: {
|
||||
title: i18next.t('map.route-quality-shortcut', { action: '$t(map.route-quality-cost)', key: 'C' }),
|
||||
|
|
@ -66,7 +66,7 @@ BR.RoutingPathQuality = L.Control.extend({
|
|||
provider: new HotLineQualityProvider({
|
||||
hotlineOptions: {
|
||||
outlineColor: 'dimgray',
|
||||
renderer: renderer
|
||||
renderer: renderer,
|
||||
},
|
||||
valueFunction: function (latLng) {
|
||||
var feature = latLng.feature;
|
||||
|
|
@ -78,9 +78,9 @@ BR.RoutingPathQuality = L.Control.extend({
|
|||
distance;
|
||||
}
|
||||
return cost;
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
}),
|
||||
},
|
||||
};
|
||||
this._initialProvider = this.options.initialProvider || 'incline';
|
||||
this.selectedProvider = this._initialProvider;
|
||||
|
|
@ -138,7 +138,7 @@ BR.RoutingPathQuality = L.Control.extend({
|
|||
this._activate(btn);
|
||||
}
|
||||
}, this);
|
||||
}, this)(nextState)
|
||||
}, this)(nextState),
|
||||
});
|
||||
}
|
||||
|
||||
|
|
@ -148,7 +148,7 @@ BR.RoutingPathQuality = L.Control.extend({
|
|||
}
|
||||
|
||||
this.routingPathButton = new L.easyButton({
|
||||
states: states
|
||||
states: states,
|
||||
}).addTo(map);
|
||||
return new L.DomUtil.create('div');
|
||||
},
|
||||
|
|
@ -211,7 +211,7 @@ BR.RoutingPathQuality = L.Control.extend({
|
|||
this._muted = false;
|
||||
this._activate(this.routingPathButton);
|
||||
}
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
var HotLineQualityProvider = L.Class.extend({
|
||||
|
|
@ -285,7 +285,7 @@ var HotLineQualityProvider = L.Class.extend({
|
|||
}
|
||||
return {
|
||||
min: min,
|
||||
max: max
|
||||
max: max,
|
||||
};
|
||||
}
|
||||
},
|
||||
});
|
||||
|
|
|
|||
|
|
@ -2,14 +2,14 @@ BR.Search = L.Control.Geocoder.extend({
|
|||
options: {
|
||||
geocoder: new L.Control.Geocoder.LatLng({
|
||||
next: new L.Control.Geocoder.Nominatim({
|
||||
serviceUrl: 'https://nominatim.openstreetmap.org/'
|
||||
serviceUrl: 'https://nominatim.openstreetmap.org/',
|
||||
}),
|
||||
sizeInMeters: 800
|
||||
sizeInMeters: 800,
|
||||
}),
|
||||
position: 'topleft',
|
||||
shortcut: {
|
||||
search: 70 // char code for 'f'
|
||||
}
|
||||
search: 70, // char code for 'f'
|
||||
},
|
||||
},
|
||||
|
||||
initialize: function (options) {
|
||||
|
|
@ -17,7 +17,7 @@ BR.Search = L.Control.Geocoder.extend({
|
|||
L.setOptions(this, {
|
||||
// i18next.t will only return 'undefined' if it is called in a static context
|
||||
// (e.g. when added directly to "options:" above), so we have to call it here
|
||||
placeholder: i18next.t('map.geocoder-placeholder')
|
||||
placeholder: i18next.t('map.geocoder-placeholder'),
|
||||
});
|
||||
|
||||
L.DomEvent.addListener(document, 'keydown', this._keydownListener, this);
|
||||
|
|
@ -25,7 +25,7 @@ BR.Search = L.Control.Geocoder.extend({
|
|||
|
||||
markGeocode: function (result) {
|
||||
this._map.fitBounds(result.geocode.bbox, {
|
||||
maxZoom: 17
|
||||
maxZoom: 17,
|
||||
});
|
||||
|
||||
this.clear();
|
||||
|
|
@ -33,7 +33,7 @@ BR.Search = L.Control.Geocoder.extend({
|
|||
interactive: false,
|
||||
color: 'red',
|
||||
opacity: 1,
|
||||
weight: 3
|
||||
weight: 3,
|
||||
}).addTo(this._map);
|
||||
|
||||
return this;
|
||||
|
|
@ -50,5 +50,5 @@ BR.Search = L.Control.Geocoder.extend({
|
|||
$('#map .leaflet-control-geocoder')[0].dispatchEvent(new MouseEvent('mousedown'));
|
||||
e.preventDefault();
|
||||
}
|
||||
}
|
||||
},
|
||||
});
|
||||
|
|
|
|||
|
|
@ -9,12 +9,12 @@ BR.Sidebar = L.Control.Sidebar.extend({
|
|||
defaultTabId: '',
|
||||
|
||||
shortcut: {
|
||||
toggleTabs: 84 // char code for 't'
|
||||
toggleTabs: 84, // char code for 't'
|
||||
},
|
||||
|
||||
// Tabs to be notified when shown or hidden
|
||||
// (tab div id -> object implementing show/hide methods)
|
||||
listeningTabs: {}
|
||||
listeningTabs: {},
|
||||
},
|
||||
|
||||
initialize: function (id, options) {
|
||||
|
|
@ -142,7 +142,7 @@ BR.Sidebar = L.Control.Sidebar.extend({
|
|||
this.open(nextTab.attr('href').slice(1));
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
BR.sidebar = function (divId, options) {
|
||||
|
|
|
|||
|
|
@ -15,8 +15,8 @@ BR.tracksLoader = function(map, layersControl, routing, pois) {
|
|||
// File size limit in kb (default: 1024) ?
|
||||
fileSizeLimit: 1024,
|
||||
shortcut: {
|
||||
open: 79 // char code for 'o'
|
||||
}
|
||||
open: 79, // char code for 'o'
|
||||
},
|
||||
},
|
||||
|
||||
_initContainer: function () {
|
||||
|
|
@ -68,7 +68,7 @@ BR.tracksLoader = function(map, layersControl, routing, pois) {
|
|||
$('#navbarLoadTracks')[0].click();
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
});
|
||||
var tracksLoaderControl = new TracksLoader();
|
||||
tracksLoaderControl.addTo(map);
|
||||
|
|
@ -105,7 +105,7 @@ BR.tracksLoader = function(map, layersControl, routing, pois) {
|
|||
var err = event.error;
|
||||
BR.message.showError(
|
||||
i18next.t('warning.tracks-load-error', {
|
||||
error: err && err.message ? err.message : err
|
||||
error: err && err.message ? err.message : err,
|
||||
})
|
||||
);
|
||||
console.error(err);
|
||||
|
|
|
|||
|
|
@ -127,5 +127,5 @@ L.DistanceMarkers = L.LayerGroup.extend({
|
|||
i = Math.floor(i / 2);
|
||||
}
|
||||
return zoom;
|
||||
}
|
||||
},
|
||||
});
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@
|
|||
center: new L.LatLng(lat, lon),
|
||||
zoom: zoom,
|
||||
layers: layers,
|
||||
additional: additional
|
||||
additional: additional,
|
||||
};
|
||||
}
|
||||
} else {
|
||||
|
|
@ -57,7 +57,7 @@
|
|||
}),
|
||||
(L.Hash.prototype = {
|
||||
options: {
|
||||
layerSeparator: ','
|
||||
layerSeparator: ',',
|
||||
},
|
||||
map: null,
|
||||
lastHash: null,
|
||||
|
|
@ -268,7 +268,7 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
});
|
||||
L.hash = function (map, options) {
|
||||
return new L.Hash(map, options);
|
||||
|
|
|
|||
|
|
@ -4,22 +4,22 @@ BR.stravaSegments = function(map, layersControl) {
|
|||
runningTitle: i18next.t('map.strava-shortcut', { action: '$t(map.strava-running)', key: 'S' }),
|
||||
bikingTitle: i18next.t('map.strava-shortcut', { action: '$t(map.strava-biking)', key: 'S' }),
|
||||
loadingTitle: i18next.t('map.loading'),
|
||||
stravaToken: BR.keys.strava
|
||||
stravaToken: BR.keys.strava,
|
||||
})
|
||||
.addTo(map);
|
||||
layersControl.addOverlay(stravaControl.stravaLayer, i18next.t('map.layer.strava-segments'));
|
||||
stravaControl.onError = function (err) {
|
||||
BR.message.showError(
|
||||
i18next.t('warning.strava-error', {
|
||||
error: err && err.message ? err.message : err
|
||||
error: err && err.message ? err.message : err,
|
||||
})
|
||||
);
|
||||
};
|
||||
|
||||
L.setOptions(this, {
|
||||
shortcut: {
|
||||
toggleLayer: 83 // char code for 's'
|
||||
}
|
||||
toggleLayer: 83, // char code for 's'
|
||||
},
|
||||
});
|
||||
|
||||
// hide strava buttons when layer is inactive
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ L.BRouter = L.Class.extend({
|
|||
// NOTE: the routing API used here is not public!
|
||||
// /brouter?lonlats=1.1,1.2|2.1,2.2|3.1,3.2|4.1,4.2&nogos=-1.1,-1.2,1|-2.1,-2.2,2&profile=shortest&alternativeidx=1&format=kml
|
||||
URL_TEMPLATE:
|
||||
'/brouter?lonlats={lonlats}&nogos={nogos}&polylines={polylines}&polygons={polygons}&profile={profile}&alternativeidx={alternativeidx}&format={format}',
|
||||
'/brouter?lonlats={lonlats}&profile={profile}&alternativeidx={alternativeidx}&format={format}&nogos={nogos}&polylines={polylines}&polygons={polygons}',
|
||||
URL_PROFILE_UPLOAD: BR.conf.host + '/brouter/profile',
|
||||
PRECISION: 6,
|
||||
NUMBER_SEPARATOR: ',',
|
||||
|
|
@ -12,7 +12,7 @@ L.BRouter = L.Class.extend({
|
|||
CUSTOM_PREFIX: 'custom_',
|
||||
isCustomProfile: function (profileName) {
|
||||
return profileName && profileName.substring(0, 7) === L.BRouter.CUSTOM_PREFIX;
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
options: {},
|
||||
|
|
@ -42,7 +42,7 @@ L.BRouter = L.Class.extend({
|
|||
L.setOptions(this, options);
|
||||
},
|
||||
|
||||
getUrlParams: function(latLngs, pois, format) {
|
||||
getUrlParams: function (latLngs, pois, circlego, format) {
|
||||
params = {};
|
||||
if (this._getLonLatsString(latLngs) != null) params.lonlats = this._getLonLatsString(latLngs);
|
||||
|
||||
|
|
@ -59,6 +59,8 @@ L.BRouter = L.Class.extend({
|
|||
|
||||
if (pois && this._getLonLatsNameString(pois) != null) params.pois = this._getLonLatsNameString(pois);
|
||||
|
||||
if (circlego) params.circlego = circlego;
|
||||
|
||||
params.alternativeidx = this.options.alternative;
|
||||
|
||||
if (format != null) {
|
||||
|
|
@ -100,15 +102,27 @@ L.BRouter = L.Class.extend({
|
|||
if (params.pois) {
|
||||
opts.pois = this._parseLonLatNames(params.pois);
|
||||
}
|
||||
if (params.circlego) {
|
||||
var circlego = params.circlego.split(',');
|
||||
if (circlego.length == 3) {
|
||||
circlego = [
|
||||
Number.parseFloat(circlego[0]),
|
||||
Number.parseFloat(circlego[1]),
|
||||
Number.parseInt(circlego[2]),
|
||||
];
|
||||
opts.circlego = circlego;
|
||||
}
|
||||
}
|
||||
return opts;
|
||||
},
|
||||
|
||||
getUrl: function(latLngs, pois, format, trackname, exportWaypoints) {
|
||||
var urlParams = this.getUrlParams(latLngs, pois, format);
|
||||
getUrl: function (latLngs, pois, circlego, format, trackname, exportWaypoints) {
|
||||
var urlParams = this.getUrlParams(latLngs, pois, circlego, format);
|
||||
var args = [];
|
||||
if (urlParams.lonlats != null && urlParams.lonlats.length > 0)
|
||||
args.push(L.Util.template('lonlats={lonlats}', urlParams));
|
||||
if (urlParams.pois != null && urlParams.pois.length > 0) args.push(L.Util.template('pois={pois}', urlParams));
|
||||
if (urlParams.circlego != null) args.push(L.Util.template('circlego={circlego}', urlParams));
|
||||
if (urlParams.nogos != null) args.push(L.Util.template('nogos={nogos}', urlParams));
|
||||
if (urlParams.polylines != null) args.push(L.Util.template('polylines={polylines}', urlParams));
|
||||
if (urlParams.polygons != null) args.push(L.Util.template('polygons={polygons}', urlParams));
|
||||
|
|
@ -118,7 +132,7 @@ L.BRouter = L.Class.extend({
|
|||
if (trackname)
|
||||
args.push(
|
||||
L.Util.template('trackname={trackname}', {
|
||||
trackname: trackname
|
||||
trackname: trackname,
|
||||
})
|
||||
);
|
||||
if (exportWaypoints) args.push('exportWaypoints=1');
|
||||
|
|
@ -129,7 +143,7 @@ L.BRouter = L.Class.extend({
|
|||
},
|
||||
|
||||
getRoute: function (latLngs, cb) {
|
||||
var url = this.getUrl(latLngs, null, 'geojson'),
|
||||
var url = this.getUrl(latLngs, null, null, 'geojson'),
|
||||
xhr = new XMLHttpRequest();
|
||||
|
||||
if (!url) {
|
||||
|
|
@ -234,11 +248,11 @@ L.BRouter = L.Class.extend({
|
|||
elev: parseInt(featureMessage[5]),
|
||||
turn: parseInt(featureMessage[6]),
|
||||
node: parseInt(featureMessage[7]),
|
||||
initial: parseInt(featureMessage[8])
|
||||
initial: parseInt(featureMessage[8]),
|
||||
},
|
||||
distance: parseInt(featureMessage[3]),
|
||||
wayTags: featureMessage[9],
|
||||
nodeTags: featureMessage[10]
|
||||
nodeTags: featureMessage[10],
|
||||
};
|
||||
},
|
||||
|
||||
|
|
@ -485,7 +499,7 @@ L.BRouter = L.Class.extend({
|
|||
s += L.BRouter.NUMBER_SEPARATOR;
|
||||
s += L.Util.formatNum(latLng.lat || latLng[0], L.BRouter.PRECISION);
|
||||
return s;
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
L.bRouter = function (options) {
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ var brouterCgi = (function() {
|
|||
toLat: L.Util.formatNum(latLngs[1].lat, PRECISION),
|
||||
toLng: L.Util.formatNum(latLngs[1].lng, PRECISION),
|
||||
profile: 'trekking',
|
||||
alt: '0'
|
||||
alt: '0',
|
||||
};
|
||||
var url = L.Util.template(URL_TEMPLATE, urlParams);
|
||||
//console.log(url);
|
||||
|
|
@ -24,6 +24,6 @@ var brouterCgi = (function() {
|
|||
}
|
||||
|
||||
return {
|
||||
getUrl: getUrl
|
||||
getUrl: getUrl,
|
||||
};
|
||||
})();
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ BR.Track = {
|
|||
var currentLayerId = layersControl.getActiveBaseLayer().layer.id;
|
||||
return {
|
||||
color: currentLayerId === 'cyclosm' ? 'yellow' : 'blue',
|
||||
weight: 4
|
||||
weight: 4,
|
||||
};
|
||||
},
|
||||
interactive: false,
|
||||
|
|
@ -29,9 +29,9 @@ BR.Track = {
|
|||
interactive: false,
|
||||
opacity: 0.7,
|
||||
// prevent being on top of route markers
|
||||
zIndexOffset: -1000
|
||||
zIndexOffset: -1000,
|
||||
});
|
||||
}
|
||||
},
|
||||
};
|
||||
},
|
||||
|
||||
|
|
@ -79,5 +79,5 @@ BR.Track = {
|
|||
*/
|
||||
isPoiPoint: function (geoJsonFeature) {
|
||||
return turf.getType(geoJsonFeature) === 'Point' && !BR.Track.isRouteWaypoint(geoJsonFeature);
|
||||
}
|
||||
},
|
||||
};
|
||||
|
|
|
|||
|
|
@ -75,5 +75,5 @@ BR.TrackEdges = L.Class.extend({
|
|||
lat = message[1] / 1000000;
|
||||
|
||||
return L.latLng(lat, lon);
|
||||
}
|
||||
},
|
||||
});
|
||||
|
|
|
|||
|
|
@ -15,6 +15,6 @@
|
|||
strava: '',
|
||||
|
||||
// OpenMapSurfer (OpenRouteService API), https://openrouteservice.org/plans/
|
||||
openrouteservice: ''
|
||||
openrouteservice: '',
|
||||
};
|
||||
})();
|
||||
|
|
|
|||
282
locales/ca.json
Normal file
282
locales/ca.json
Normal file
|
|
@ -0,0 +1,282 @@
|
|||
{
|
||||
"about": {
|
||||
"bug-reports": "Informes d'errors i petició de funcionalitats:",
|
||||
"bug-reports-back": "servidor / dorsal, motor d'itineraris, aplicació Android, web brouter.de",
|
||||
"bug-reports-front": "client web / frontal.",
|
||||
"chat": "Xat amb usuaris i desenvolupadors",
|
||||
"contact": "Contacte:",
|
||||
"contact-language": "L'idioma preferit és l'anglès, ja que tenim tant contribuïdors com usuaris d'arreu del món.",
|
||||
"data": "Dades:",
|
||||
"data-description": "Això està basat en <a href=\"https://www.openstreetmap.org\" target=\"_blank\">OpenStreetMap</a>. Normalment s'actualitza diàriament, veure les dates a <a href=\"https://brouter.de/brouter/segments4/\" target=\"_blank\">fitxers de dades</a>.",
|
||||
"description": "Serveis en línia del motor d'itineraris BRouter. Per l'aplicació Android fora de línia i més informació, veure <a href=\"https://brouter.de/\" target=\"_blank\">brouter.de</a>",
|
||||
"details": "<i><a href=\"{{privacyPolicyUrl}}\" target=\"_blank\">Política de privacitat</a></i>, \n<i><a href=\"https://github.com/nrenner/brouter-web#credits-and-licenses\" target=\"_blank\">Crèdits</a></i>,\n<i><a href=\"https://github.com/nrenner/brouter-web/blob/master/CHANGELOG.md\" target=\"_blank\">Registre de canvis</a></i> i\n<i><a href=\"https://github.com/nrenner/brouter-web#readme\" target=\"_blank\">més informació</a></i> sobre el client.",
|
||||
"support": "Debats generals/preguntes, suport",
|
||||
"title": "Quant a",
|
||||
"tooltip": "Mostra més informació sobre BRouter-Web"
|
||||
},
|
||||
"credits": {
|
||||
"brouter": "BRouter",
|
||||
"brouter-license": "<a target=\"_blank\" href=\"https://brouter.de/brouter\">BRouter</a> © Arndt Brenschede",
|
||||
"elevation-data": "Dades d'elevació",
|
||||
"esri-license": "<a target=\"_blank\" href=\"http://goto.arcgisonline.com/maps/World_Imagery\">Imatgeria del món</a> © <a target=\"_blank\" href=\"https://www.esri.com/\">Esri</a>, fonts: Esri, DigitalGlobe, Earthstar Geographics, CNES/Airbus DS, GeoEye, USDA FSA, USGS, Getmapping, Aerogrid, IGN, IGP, i la comunitat d'usuaris de SIG",
|
||||
"esri-tiles": "Imatgeria del món d'Esri",
|
||||
"map-data": "Dades del mapa",
|
||||
"map-tiles": "Tessel·les del mapa",
|
||||
"nominatim": "Cerca per <a href=\"https://wiki.openstreetmap.org/wiki/Nominatim\" target=\"_blank\" data-i18n=\"credits.nominatim\">Nominatim</a>",
|
||||
"openstreetmap": "© <a target=\"_blank\" href=\"https://www.openstreetmap.org/copyright\" >contribuïdors d'OpenStreetMap</a> sota <a target=\"_blank\" href=\"https://opendatacommons.org/licenses/odbl/\" >ODbL</a>"
|
||||
},
|
||||
"export": {
|
||||
"format": "Format",
|
||||
"format_csv": "CSV",
|
||||
"format_geojson": "GeoJSON",
|
||||
"format_gpx": "GPX",
|
||||
"format_kml": "KML",
|
||||
"include": "Inclou",
|
||||
"include_waypoints": "Fites",
|
||||
"route-from-to": "{{from}} -> {{to}} ({{distance}}km)",
|
||||
"route-loop": "{{from}} ({{distance}}km)",
|
||||
"title": "Exporta la ruta",
|
||||
"trackname": "Nom"
|
||||
},
|
||||
"footer": {
|
||||
"ascend": "Desnivell acumulat",
|
||||
"cost": "Cost",
|
||||
"distance": "Distància",
|
||||
"elevation-chart": "Commuta el gràfic d'elevació",
|
||||
"energy-per-100km": "Energia per 100 km",
|
||||
"hours": "hores",
|
||||
"hours-abbrev": "h",
|
||||
"kilometer": "kilòmetres",
|
||||
"kilometer-abbrev": "km",
|
||||
"kilowatthour": "kilowatts hora",
|
||||
"kilowatthour-abbrev": "kWh",
|
||||
"mean-cost-factor": "Factor de cost mitjà",
|
||||
"meter": "metres",
|
||||
"meter-abbrev": "m",
|
||||
"plain-ascend": "Desnivell final",
|
||||
"stats-info": "Comenceu a dibuixar una ruta per obtenir les estadístiques",
|
||||
"total-energy": "Energia total",
|
||||
"travel-time": "Temps de viatge"
|
||||
},
|
||||
"keyboard": {
|
||||
"backspace": "Retrocés",
|
||||
"escape": "Esc",
|
||||
"generic-shortcut": "{{action}} ({{key}} tecla)",
|
||||
"shift": "Majúscules"
|
||||
},
|
||||
"layers": {
|
||||
"add-base": "Afegeix una capa base",
|
||||
"add-overlay": "Afegeix superposició",
|
||||
"customize": "Personalitza les capes",
|
||||
"opacity-slider": "Control lliscant de l'opacitat",
|
||||
"placeholder-layer-name": "Nom de la capa personalitzada. (eg: OpenStreetMap)",
|
||||
"placeholder-layer-url": "URL de la capa personalitzada. (eg: https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png)",
|
||||
"remove-selection": "Elimina la selecció"
|
||||
},
|
||||
"loadNogos": {
|
||||
"defaultProperties": "Propietats per defecte",
|
||||
"file": "Fitxer (.geojson):",
|
||||
"load": "Carrega",
|
||||
"nogoBuffer": "Zona d'influència de les àrees omeses (en metres):",
|
||||
"nogoRadius": "Radi de les àrees omeses per punts (en metres)",
|
||||
"nogoWeight": "Pes de les àrees omeses (-1 vol dir inaccessible)",
|
||||
"source": "Font",
|
||||
"title": "Carrega les àrees omeses",
|
||||
"url": "URL: "
|
||||
},
|
||||
"map": {
|
||||
"attribution-osm-long": "Contribuidors de l'OpenStreetMap",
|
||||
"attribution-osm-short": "OpenStreetMap",
|
||||
"clear-route": "Neteja les dades de la ruta",
|
||||
"copyright": "Copyright",
|
||||
"cycling": "Ciclisme",
|
||||
"delete-last-point": "Esborra l'últim punt",
|
||||
"delete-nogo-areas": "Esborra totes les àrees omeses",
|
||||
"delete-pois": "Esborra tots els punts d'interès",
|
||||
"delete-route": "Esborra la ruta",
|
||||
"draw-circlego-start": "Draw limited {{radius}}km go-to zone",
|
||||
"draw-circlego-stop": "Stop drawing limited {{radius}}km go-to zone",
|
||||
"draw-poi-start": "Dibuixa punts d'interès",
|
||||
"draw-poi-stop": "Para de dibuixar punts d'interès",
|
||||
"draw-route-start": "Dibuixa una ruta",
|
||||
"draw-route-stop": "Para de dibuixar la ruta",
|
||||
"enter-poi-name": "Introdueix el nom del punt d'interès",
|
||||
"geocoder": "Cerca",
|
||||
"geocoder-placeholder": "Cerca...",
|
||||
"hikebike-hillshading": "Ombreig del relleu ",
|
||||
"hiking": "Excursionisme",
|
||||
"layer": {
|
||||
"bing": "Bing aeri",
|
||||
"cycle": "OpenCycleMap (Thunderf.)",
|
||||
"cycling": "Bici (camins marcats)",
|
||||
"digitalglobe": "Imatgeria recent de DigitalGlobe",
|
||||
"esri": "Imatgeria del món d'Esri",
|
||||
"hikebike-hillshading": "Ombreig del relleu (mapa per caminades i bici)",
|
||||
"hiking": "Caminada (camins marcats)",
|
||||
"osm": "OpenStreetMap",
|
||||
"osmde": "OpenStreetMap.de",
|
||||
"outdoors": "Aire lliure (Thunderforest)",
|
||||
"route-quality": "Codificació de la qualitat de la ruta",
|
||||
"stamen-terrain": "Terreny (Stamen)",
|
||||
"strava-segments": "Segments de Strava",
|
||||
"topo": "OpenTopoMap"
|
||||
},
|
||||
"loading": "Carregant...",
|
||||
"locate-me": "Mostra'm on sóc",
|
||||
"nogo": {
|
||||
"cancel": "Cancel·la el dibuix d'àrees omeses",
|
||||
"click-drag": "Cliqueu i arrossegueu per dibuixar un cercle",
|
||||
"draw": "Dibuixa una àrea omesa circular",
|
||||
"edit": "Cliqueu per editar",
|
||||
"help": "□ = mou / redimensiona, <span class=\"fa fa-trash-o\"></span> = esborra,<br>clique al cercle per deixar d'editar"
|
||||
},
|
||||
"opacity-slider": "Especifica la transparència de la ruta i els marcadors",
|
||||
"opacity-slider-shortcut": "{{action}}\n(Mantén premuda la tecla {{key}} per silenciar temporalment)",
|
||||
"preview": "Previsualitza",
|
||||
"privacy": "Privacitat",
|
||||
"reverse-route": "Capgira la ruta",
|
||||
"route-quality-altitude": "Codificació de l'altitud",
|
||||
"route-quality-cost": "Codificació del cost",
|
||||
"route-quality-incline": "Codificació de la inclinació",
|
||||
"route-quality-shortcut": "{{action}} ({{key}} tecla per commutar)",
|
||||
"strava-biking": "Mostra els segments de bici de Strava",
|
||||
"strava-running": "Mostra els segments de córrer de Strava",
|
||||
"strava-shortcut": "{{action}}\n(tecla {{key}} per commutar les capes, cliqueu per recarregar l'àrea actual)",
|
||||
"zoomInTitle": "Apropa",
|
||||
"zoomOutTitle": "Allunya"
|
||||
},
|
||||
"modal": {
|
||||
"close": "Tanca"
|
||||
},
|
||||
"navbar": {
|
||||
"about": "Quant a",
|
||||
"alternative": {
|
||||
"first": "1a alternativa",
|
||||
"original": "Original",
|
||||
"second": "2a alternativa",
|
||||
"third": "3a alternativa"
|
||||
},
|
||||
"export": "Exporta",
|
||||
"export-tooltip": "Exporta la ruta",
|
||||
"load": {
|
||||
"nogos": "Carrega les àrees omeses",
|
||||
"title": "Carrega",
|
||||
"tooltip": "{{tracksAction}} (tecla {{tracksKey}})\n{{nogosAction}} ({{nogosKey}})",
|
||||
"tracks": "Carrega traces"
|
||||
},
|
||||
"profile": {
|
||||
"car-eco": "Cotxe (econòmic)",
|
||||
"car-fast": "Cotxe (ràpid)",
|
||||
"car-test": "Cotxe (test)",
|
||||
"custom": "Personalitzat",
|
||||
"fastbike": "Bici ràpida",
|
||||
"fastbike-asia-pacific": "Bici ràpida (Àsia Pacífic)",
|
||||
"fastbike-lowtraffic": "Bici ràpida (poc trànsit)",
|
||||
"hiking-beta": "Excursionisme (beta)",
|
||||
"moped": "Ciclomotor",
|
||||
"rail": "Via",
|
||||
"river": "Riu",
|
||||
"safety": "Seguretat",
|
||||
"shortest": "El més curt",
|
||||
"trekking": "Trescar amb bici",
|
||||
"trekking-ignore-cr": "Trescar amb bici (ignora les rutes de bici)",
|
||||
"trekking-noferries": "Trescar amb bici (sense ferris)",
|
||||
"trekking-nosteps": "Trescar amb bici (sense graons)",
|
||||
"trekking-steep": "Trescar amb bici (dret)",
|
||||
"vm-forum-liegerad-schnell": "Trescar amb bici (ràpid)",
|
||||
"vm-forum-velomobil-schnell": "Velomobile (ràpid)"
|
||||
},
|
||||
"profile-tooltip": "\n(tecla {{key}} per canviar)"
|
||||
},
|
||||
"sidebar": {
|
||||
"analysis": {
|
||||
"header": {
|
||||
"highway": "Autopista",
|
||||
"smoothness": "Suavitat",
|
||||
"surface": "Superfície"
|
||||
},
|
||||
"table": {
|
||||
"category": "Categoria",
|
||||
"length": "Longitud",
|
||||
"total_known": "Total conegut:",
|
||||
"unknown": "Desconegut"
|
||||
},
|
||||
"title": "Anàlisi",
|
||||
"tooltip": "Analitza la ruta"
|
||||
},
|
||||
"customize-profile": {
|
||||
"title": "Personalitza el perfil",
|
||||
"tooltip": "Personalitza el perfil"
|
||||
},
|
||||
"data": {
|
||||
"sync-map": "Sincronitza el mapa",
|
||||
"title": "Dades",
|
||||
"tooltip": "Mostra la taula de dades detallades de la ruta"
|
||||
},
|
||||
"itinerary": {
|
||||
"title": "Itinerari",
|
||||
"tooltip": "Mostra l'itinerari"
|
||||
},
|
||||
"layers": {
|
||||
"category": {
|
||||
"base-layers": "Capes base",
|
||||
"country": "País",
|
||||
"europe": "Europa",
|
||||
"europe-monolingual": "Europa monolingüe",
|
||||
"overlays": "Superposicions",
|
||||
"worldwide": "Arreu del món",
|
||||
"worldwide-international": "Arreu del món internacional",
|
||||
"worldwide-monolingual": "Arreu del món monolígüe"
|
||||
},
|
||||
"collapse": "Col·lapsa-ho tot",
|
||||
"custom-layers": "Capes personalitzades",
|
||||
"customize": "Afegeix o elimina capes personalitzades",
|
||||
"expand": "Expandeix-ho tot",
|
||||
"optional": "Afegeix o elimina capes opcionals",
|
||||
"optional-layers": "Més",
|
||||
"overlay-opacity": "Transparència de la superposició",
|
||||
"table": {
|
||||
"URL": "URL",
|
||||
"empty": "Encara no hi ha cap capa personalitzada configurada.",
|
||||
"name": "Nom",
|
||||
"type": "Tipus"
|
||||
},
|
||||
"title": "Capes",
|
||||
"tooltip": "Seleccioneu capes"
|
||||
},
|
||||
"profile": {
|
||||
"apply": "Aplica",
|
||||
"clear": "Neteja",
|
||||
"help": "Ajuda",
|
||||
"no_easy_configuration_warning": "No hi ha configuració fàcil per aquest perfil.",
|
||||
"options": "Opcions",
|
||||
"placeholder": "Escriviu el vostre propi perfil personalitzat aquí",
|
||||
"profile": "Perfil"
|
||||
},
|
||||
"tab-tooltip": "{{action}}\n(tecla {{toggleKey}} per commutar, {{switchKey}} per canviar a la pestanya següent)"
|
||||
},
|
||||
"title": "Client web de BRouter",
|
||||
"trackasroute": {
|
||||
"explainpoi": "(mostra les fites com a PDI)",
|
||||
"explaintracklayer": "(mostra traces com a capa separada)",
|
||||
"file": "Fitxer de traça",
|
||||
"fuzziness": "grau d'aproximació",
|
||||
"pleasewait": "Espereu si us plau.",
|
||||
"showpois": "PDI",
|
||||
"title": "Carrega una traça com a ruta",
|
||||
"tracklayer": "Capa de la traça",
|
||||
"tuning": "Ajust"
|
||||
},
|
||||
"warning": {
|
||||
"cannot-get-route": "Error en obtenir l'URL de la ruta",
|
||||
"invalid-route-from": "Start marker is too far from a route.",
|
||||
"invalid-route-to": "Destination marker is too far from a route.",
|
||||
"no-response": "el servidor no respon",
|
||||
"no-route-found": "Error: no es pot trobar una ruta pels punts donats. Podríeu provar de moure'ls més a prop de carreteres?",
|
||||
"profile-error": "Error del perfil: cap resposta o resposta buida del servidor",
|
||||
"strava-error": "Error en obtenir els segments de Strava: {{error}}",
|
||||
"temporary-profile": "<strong>Nota:</strong> Els perfils personalitzats carregats només es desen temporalment al servidor.<br/>Deseu les vostres edicions al vostre ordinador.",
|
||||
"tracks-load-error": "Error en carregar les traces: {{error}}",
|
||||
"upload-error": "Error de càrrega: {{error}}"
|
||||
}
|
||||
}
|
||||
|
|
@ -94,6 +94,8 @@
|
|||
"delete-nogo-areas": "Alle No-go-Areas löschen",
|
||||
"delete-pois": "Alle POI löschen",
|
||||
"delete-route": "Route löschen",
|
||||
"draw-circlego-start": "Draw limited {{radius}}km go-to zone",
|
||||
"draw-circlego-stop": "Stop drawing limited {{radius}}km go-to zone",
|
||||
"draw-poi-start": "POI einzeichnen",
|
||||
"draw-poi-stop": "Einzeichnen der POI beenden",
|
||||
"draw-route-start": "Route zeichnen",
|
||||
|
|
@ -267,6 +269,8 @@
|
|||
},
|
||||
"warning": {
|
||||
"cannot-get-route": "Fehler beim Abrufen der Routen-URL",
|
||||
"invalid-route-from": "Start marker is too far from a route.",
|
||||
"invalid-route-to": "Destination marker is too far from a route.",
|
||||
"no-response": "Keine Antwort vom Server",
|
||||
"no-route-found": "Fehler: kann für angegebene Punkte keine Route finden. Vielleicht die Punkte näher an Straßen verschieben?",
|
||||
"profile-error": "Profil-Fehler: keine oder leere Antwort vom Server",
|
||||
|
|
|
|||
|
|
@ -94,6 +94,8 @@
|
|||
"delete-nogo-areas": "Delete all no-go areas",
|
||||
"delete-pois": "Delete all points of interest",
|
||||
"delete-route": "Delete route",
|
||||
"draw-circlego-start": "Draw limited {{radius}}km go-to zone",
|
||||
"draw-circlego-stop": "Stop drawing limited {{radius}}km go-to zone",
|
||||
"draw-poi-start": "Draw points of interest",
|
||||
"draw-poi-stop": "Stop drawing points of interest",
|
||||
"draw-route-start": "Draw route",
|
||||
|
|
@ -258,7 +260,7 @@
|
|||
"explainpoi": "(show waypoints as POI's)",
|
||||
"explaintracklayer": "(show Track as separate Layer)",
|
||||
"file": "Trackfile",
|
||||
"fuzziness": "fuzzines",
|
||||
"fuzziness": "fuzziness",
|
||||
"pleasewait": "Please wait!",
|
||||
"showpois": "POI's",
|
||||
"title": "Load Track as Route",
|
||||
|
|
@ -267,6 +269,8 @@
|
|||
},
|
||||
"warning": {
|
||||
"cannot-get-route": "Error getting route URL",
|
||||
"invalid-route-from": "Start marker is too far from a route.",
|
||||
"invalid-route-to": "Destination marker is too far from a route.",
|
||||
"no-response": "no response from server",
|
||||
"no-route-found": "Error: cannot find a route for given points. Maybe try to move them closer to roads?",
|
||||
"profile-error": "Profile error: no or empty response from server",
|
||||
|
|
|
|||
|
|
@ -94,6 +94,8 @@
|
|||
"delete-nogo-areas": "Delete all no-go areas",
|
||||
"delete-pois": "Delete all points of interest",
|
||||
"delete-route": "Delete route",
|
||||
"draw-circlego-start": "Draw limited {{radius}}km go-to zone",
|
||||
"draw-circlego-stop": "Stop drawing limited {{radius}}km go-to zone",
|
||||
"draw-poi-start": "Draw points of interest",
|
||||
"draw-poi-stop": "Stop drawing points of interest",
|
||||
"draw-route-start": "Draw route",
|
||||
|
|
@ -258,7 +260,7 @@
|
|||
"explainpoi": "(show waypoints as POI's)",
|
||||
"explaintracklayer": "(show Track as separate Layer)",
|
||||
"file": "Trackfile",
|
||||
"fuzziness": "fuzzines",
|
||||
"fuzziness": "fuzziness",
|
||||
"pleasewait": "Please wait!",
|
||||
"showpois": "POI's",
|
||||
"title": "Load Track as Route",
|
||||
|
|
@ -267,6 +269,8 @@
|
|||
},
|
||||
"warning": {
|
||||
"cannot-get-route": "Error getting route URL",
|
||||
"invalid-route-from": "Start marker is too far from a route.",
|
||||
"invalid-route-to": "Destination marker is too far from a route.",
|
||||
"no-response": "no response from server",
|
||||
"no-route-found": "Error: cannot find a route for given points. Maybe try to move them closer to roads?",
|
||||
"profile-error": "Profile error: no or empty response from server",
|
||||
|
|
|
|||
|
|
@ -94,6 +94,8 @@
|
|||
"delete-nogo-areas": "Eliminar todas las áreas prohibidas",
|
||||
"delete-pois": "Eliminar todos los Puntos de Interés",
|
||||
"delete-route": "Eliminar ruta",
|
||||
"draw-circlego-start": "Draw limited {{radius}}km go-to zone",
|
||||
"draw-circlego-stop": "Stop drawing limited {{radius}}km go-to zone",
|
||||
"draw-poi-start": "Draw points of interest",
|
||||
"draw-poi-stop": "Stop drawing points of interest",
|
||||
"draw-route-start": "Draw route",
|
||||
|
|
@ -258,7 +260,7 @@
|
|||
"explainpoi": "(show waypoints as POI's)",
|
||||
"explaintracklayer": "(show Track as separate Layer)",
|
||||
"file": "Trackfile",
|
||||
"fuzziness": "fuzzines",
|
||||
"fuzziness": "fuzziness",
|
||||
"pleasewait": "Please wait!",
|
||||
"showpois": "POI's",
|
||||
"title": "Load Track as Route",
|
||||
|
|
@ -267,6 +269,8 @@
|
|||
},
|
||||
"warning": {
|
||||
"cannot-get-route": "Error al obtener la URL de ruta",
|
||||
"invalid-route-from": "Start marker is too far from a route.",
|
||||
"invalid-route-to": "Destination marker is too far from a route.",
|
||||
"no-response": "sin respuesta del servidor",
|
||||
"no-route-found": "Error: no se puede encontrar una ruta para los puntos dados. ¿Quizás intentando acercarlos a las carreteras?",
|
||||
"profile-error": "Error de perfil: no o respuesta vacía del servidor",
|
||||
|
|
|
|||
|
|
@ -94,6 +94,8 @@
|
|||
"delete-nogo-areas": "Delete all no-go areas",
|
||||
"delete-pois": "Delete all points of interest",
|
||||
"delete-route": "Delete route",
|
||||
"draw-circlego-start": "Draw limited {{radius}}km go-to zone",
|
||||
"draw-circlego-stop": "Stop drawing limited {{radius}}km go-to zone",
|
||||
"draw-poi-start": "Draw points of interest",
|
||||
"draw-poi-stop": "Stop drawing points of interest",
|
||||
"draw-route-start": "Draw route",
|
||||
|
|
@ -258,7 +260,7 @@
|
|||
"explainpoi": "(show waypoints as POI's)",
|
||||
"explaintracklayer": "(show Track as separate Layer)",
|
||||
"file": "Trackfile",
|
||||
"fuzziness": "fuzzines",
|
||||
"fuzziness": "fuzziness",
|
||||
"pleasewait": "Please wait!",
|
||||
"showpois": "POI's",
|
||||
"title": "Load Track as Route",
|
||||
|
|
@ -267,6 +269,8 @@
|
|||
},
|
||||
"warning": {
|
||||
"cannot-get-route": "Error getting route URL",
|
||||
"invalid-route-from": "Start marker is too far from a route.",
|
||||
"invalid-route-to": "Destination marker is too far from a route.",
|
||||
"no-response": "no response from server",
|
||||
"no-route-found": "Error: cannot find a route for given points. Maybe try to move them closer to roads?",
|
||||
"profile-error": "Profile error: no or empty response from server",
|
||||
|
|
|
|||
100
locales/fr.json
100
locales/fr.json
|
|
@ -3,16 +3,16 @@
|
|||
"bug-reports": "Rapporter un problème ou une amélioration :",
|
||||
"bug-reports-back": "serveur, moteur de routage, appli Android, profils, site brouter.de ;",
|
||||
"bug-reports-front": "client web.",
|
||||
"chat": "Discuter avec d'autres utilisateurs et développeurs",
|
||||
"chat": "Discuter avec d'autres utilisateurs et développeurs ;",
|
||||
"contact": "Contact :",
|
||||
"contact-language": "Preferred language is English, as we have both international contributors and users.",
|
||||
"contact-language": "L'anglais est à privilégier pour les échanges, car les développeurs et utilisateurs viennent du monde entier.",
|
||||
"data": "Données :",
|
||||
"data-description": "Les données reposent sur <a href=\"https://www.openstreetmap.org\" target=\"_blank\">OpenStreetMap</a>. La mise à jour est généralement quotidienne, voir <a href=\"https://brouter.de/brouter/segments4/\" target=\"_blank\">les fichiers de données</a>. ",
|
||||
"description": "Service web pour le moteur de routage BRouter. Pour l'appli Android et de plus amples informations, voir <a href=\"https://brouter.de/\" target=\"_blank\">brouter.de</a>.",
|
||||
"details": "<i><a href=\"{{privacyPolicyUrl}}\" target=\"_blank\">Respect de la vie privée</a></i>, \n<i><a href=\"https://github.com/nrenner/brouter-web#credits-and-licenses\" target=\"_blank\">Crédits</a></i>,\n<i><a href=\"https://github.com/nrenner/brouter-web/blob/master/CHANGELOG.md\" target=\"_blank\">Changements</a></i> et\n<i><a href=\"https://github.com/nrenner/brouter-web#readme\" target=\"_blank\">plus d'infos</a></i> sur le client web.",
|
||||
"support": "Discussions/Questions générales, support ;",
|
||||
"support": "Discussions et questions générales, support ;",
|
||||
"title": "À propos",
|
||||
"tooltip": "Show more information about BRouter-Web"
|
||||
"tooltip": "Afficher plus d'informations à propos de BRouter-Web"
|
||||
},
|
||||
"credits": {
|
||||
"brouter": "BRouter",
|
||||
|
|
@ -42,7 +42,7 @@
|
|||
"ascend": "Dénivelé cumulé",
|
||||
"cost": "Coût",
|
||||
"distance": "Distance",
|
||||
"elevation-chart": "Toggle elevation chart",
|
||||
"elevation-chart": "Inverser l'affichage du profil altimétrique",
|
||||
"energy-per-100km": "pour 100km",
|
||||
"hours": "heures",
|
||||
"hours-abbrev": "h",
|
||||
|
|
@ -59,10 +59,10 @@
|
|||
"travel-time": "Temps de trajet"
|
||||
},
|
||||
"keyboard": {
|
||||
"backspace": "Backspace",
|
||||
"escape": "Escape",
|
||||
"generic-shortcut": "{{action}} ({{key}} key)",
|
||||
"shift": "Shift"
|
||||
"backspace": "Retour chariot",
|
||||
"escape": "Échap",
|
||||
"generic-shortcut": "{{action}} (touche {{key}})",
|
||||
"shift": "Maj"
|
||||
},
|
||||
"layers": {
|
||||
"add-base": "Ajouter un fond de carte ",
|
||||
|
|
@ -94,13 +94,15 @@
|
|||
"delete-nogo-areas": "Supprimer toutes les zones interdites",
|
||||
"delete-pois": "Supprimer tous les points d'intérêt ",
|
||||
"delete-route": "Supprimer l'itinéraire",
|
||||
"draw-poi-start": "Draw points of interest",
|
||||
"draw-poi-stop": "Stop drawing points of interest",
|
||||
"draw-route-start": "Draw route",
|
||||
"draw-route-stop": "Stop drawing route",
|
||||
"draw-circlego-start": "Ajouter une zone limite de {{radius}} km",
|
||||
"draw-circlego-stop": "Arrêter l'ajout d'une zone limite de {{radius}} km",
|
||||
"draw-poi-start": "Ajouter des points d'intérêt",
|
||||
"draw-poi-stop": "Arrêter l'ajout de points d'intérêt",
|
||||
"draw-route-start": "Dessiner l'itinéraire",
|
||||
"draw-route-stop": "Arrêter de dessiner l'itinéraire",
|
||||
"enter-poi-name": "Saisir le nom du point d'intérêt",
|
||||
"geocoder": "Search",
|
||||
"geocoder-placeholder": "Search…",
|
||||
"geocoder": "Rechercher",
|
||||
"geocoder-placeholder": "Rechercher…",
|
||||
"hikebike-hillshading": "Relief avec ombre",
|
||||
"hiking": "Randonnée",
|
||||
"layer": {
|
||||
|
|
@ -124,22 +126,22 @@
|
|||
"nogo": {
|
||||
"cancel": "Annuler la zone interdite",
|
||||
"click-drag": "Cliquer et faire glisser pour dessiner un cercle",
|
||||
"draw": "Draw circular no-go area",
|
||||
"draw": "Dessiner une zone interdite circulaire",
|
||||
"edit": "Cliquer pour éditer",
|
||||
"help": "□ = déplacer / redimensionner, <span class=\"fa fa-trash-o\"></span> = supprimer,<br>cliquer sur le cercle pour arrêter l'édition"
|
||||
},
|
||||
"opacity-slider": "Set transparency of route track and markers",
|
||||
"opacity-slider-shortcut": "{{action}}\n(Hold {{key}} key to mute temporarily)",
|
||||
"opacity-slider": "Définie l'opacité de l'itinéraire et des marqueurs",
|
||||
"opacity-slider-shortcut": "{{action}}\n(Maintenir la touche {{key}} pour masquer temporairement)",
|
||||
"preview": "Prévisualiser",
|
||||
"privacy": "Vie privée",
|
||||
"reverse-route": "Inverse l'itinéraire",
|
||||
"route-quality-altitude": "Chiffrage de l'altitude",
|
||||
"route-quality-cost": "Chiffrage du coût",
|
||||
"route-quality-incline": "Chiffrage d'inclinaison",
|
||||
"route-quality-shortcut": "{{action}} ({{key}} key to toggle)",
|
||||
"route-quality-shortcut": "{{action}} (touche {{key}} pour basculer)",
|
||||
"strava-biking": "Afficher les segments Strava vélo",
|
||||
"strava-running": "Afficher les segments Strava à pied",
|
||||
"strava-shortcut": "{{action}}\n({{key}} key to toggle layer, click to reload for current area)",
|
||||
"strava-shortcut": "{{action}}\n(touche {{key}} pour basculer de calque, cliquer pour recharger la zone actuelle)",
|
||||
"zoomInTitle": "Zoomer",
|
||||
"zoomOutTitle": "Dézoomer"
|
||||
},
|
||||
|
|
@ -155,12 +157,12 @@
|
|||
"third": "3ème alternative"
|
||||
},
|
||||
"export": "Exporter",
|
||||
"export-tooltip": "Export route",
|
||||
"export-tooltip": "Exporter l'itinéraire",
|
||||
"load": {
|
||||
"nogos": "Load no-go areas",
|
||||
"nogos": "Charger des zones interdites",
|
||||
"title": "Charger",
|
||||
"tooltip": "{{tracksAction}} ({{tracksKey}} key)\n{{nogosAction}} ({{nogosKey}})",
|
||||
"tracks": "Load tracks"
|
||||
"tooltip": "{{tracksAction}} (touche {{tracksKey}} )\n{{nogosAction}} ({{nogosKey}})",
|
||||
"tracks": "Charger des traces"
|
||||
},
|
||||
"profile": {
|
||||
"car-eco": "Voiture (économique)",
|
||||
|
|
@ -184,36 +186,36 @@
|
|||
"vm-forum-liegerad-schnell": "Vélo couché (rapide)",
|
||||
"vm-forum-velomobil-schnell": "Vélomobile (rapide)"
|
||||
},
|
||||
"profile-tooltip": "\n({{key}} key to switch)"
|
||||
"profile-tooltip": "\n(touche {{key}} pour échanger)"
|
||||
},
|
||||
"sidebar": {
|
||||
"analysis": {
|
||||
"header": {
|
||||
"highway": "Highway",
|
||||
"smoothness": "Smoothness",
|
||||
"surface": "Surface"
|
||||
"highway": "Grande route",
|
||||
"smoothness": "Qualité de roulage",
|
||||
"surface": "Revêtement"
|
||||
},
|
||||
"table": {
|
||||
"category": "Category",
|
||||
"length": "Length",
|
||||
"total_known": "Total Known:",
|
||||
"unknown": "Unknown"
|
||||
"category": "Catégorie",
|
||||
"length": "Longueur",
|
||||
"total_known": "Total connu :",
|
||||
"unknown": "Inconnu"
|
||||
},
|
||||
"title": "Analysis",
|
||||
"tooltip": "Analyse route"
|
||||
"title": "Analyse",
|
||||
"tooltip": "Analyse de l'itinéraire"
|
||||
},
|
||||
"customize-profile": {
|
||||
"title": "Personnaliser le profil",
|
||||
"tooltip": "Customize profile"
|
||||
"tooltip": "Personnaliser le profil"
|
||||
},
|
||||
"data": {
|
||||
"sync-map": "Synchroniser la carte",
|
||||
"title": "Données",
|
||||
"tooltip": "Show detailed route data table"
|
||||
"tooltip": "Afficher la table des données de l'itinéraire détaillé"
|
||||
},
|
||||
"itinerary": {
|
||||
"title": "Itinéraire",
|
||||
"tooltip": "Show itinerary"
|
||||
"tooltip": "Afficher l'itinéraire"
|
||||
},
|
||||
"layers": {
|
||||
"category": {
|
||||
|
|
@ -240,7 +242,7 @@
|
|||
"type": "Type"
|
||||
},
|
||||
"title": "Calques",
|
||||
"tooltip": "Select layers"
|
||||
"tooltip": "Sélection des calques"
|
||||
},
|
||||
"profile": {
|
||||
"apply": "Appliquer",
|
||||
|
|
@ -251,22 +253,24 @@
|
|||
"placeholder": "Saisissez votre profil personnalisé ici.",
|
||||
"profile": "Profil"
|
||||
},
|
||||
"tab-tooltip": "{{action}}\n({{toggleKey}} key to toggle, {{switchKey}} to switch to next tab)"
|
||||
"tab-tooltip": "{{action}}\n(touche {{toggleKey}} pour basculer, {{switchKey}} pour passer à l'onglet suivant)"
|
||||
},
|
||||
"title": "Client web BRouter",
|
||||
"trackasroute": {
|
||||
"explainpoi": "(show waypoints as POI's)",
|
||||
"explaintracklayer": "(show Track as separate Layer)",
|
||||
"file": "Trackfile",
|
||||
"fuzziness": "fuzzines",
|
||||
"pleasewait": "Please wait!",
|
||||
"showpois": "POI's",
|
||||
"title": "Load Track as Route",
|
||||
"tracklayer": "Track Layer",
|
||||
"tuning": "Tuning"
|
||||
"explainpoi": "(afficher les points de passage comme des PIs)",
|
||||
"explaintracklayer": "(afficher la piste comme un calque distinct)",
|
||||
"file": "Fichier de piste",
|
||||
"fuzziness": "flou",
|
||||
"pleasewait": "Merci de patienter !",
|
||||
"showpois": "PIs",
|
||||
"title": "Charger la trace comme itinéraire",
|
||||
"tracklayer": "Calque de trace",
|
||||
"tuning": "Réglages"
|
||||
},
|
||||
"warning": {
|
||||
"cannot-get-route": "Erreur lors de la réception de l'itinéraire",
|
||||
"invalid-route-from": "Le départ est trop éloigné d'une route.",
|
||||
"invalid-route-to": "L'arrivée est trop éloignée d'une route.",
|
||||
"no-response": "aucune réponse du serveur",
|
||||
"no-route-found": "Erreur : impossible de trouver un itinéraire correspondant aux points donnés. Essayez peut-être de rapprocher les points des routes ?",
|
||||
"profile-error": "Erreur de profil : pas de réponse ou réponse invalide du serveur",
|
||||
|
|
|
|||
|
|
@ -94,6 +94,8 @@
|
|||
"delete-nogo-areas": "Delete all no-go areas",
|
||||
"delete-pois": "Delete all points of interest",
|
||||
"delete-route": "Delete route",
|
||||
"draw-circlego-start": "Draw limited {{radius}}km go-to zone",
|
||||
"draw-circlego-stop": "Stop drawing limited {{radius}}km go-to zone",
|
||||
"draw-poi-start": "Draw points of interest",
|
||||
"draw-poi-stop": "Stop drawing points of interest",
|
||||
"draw-route-start": "Draw route",
|
||||
|
|
@ -258,7 +260,7 @@
|
|||
"explainpoi": "(show waypoints as POI's)",
|
||||
"explaintracklayer": "(show Track as separate Layer)",
|
||||
"file": "Trackfile",
|
||||
"fuzziness": "fuzzines",
|
||||
"fuzziness": "fuzziness",
|
||||
"pleasewait": "Please wait!",
|
||||
"showpois": "POI's",
|
||||
"title": "Load Track as Route",
|
||||
|
|
@ -267,6 +269,8 @@
|
|||
},
|
||||
"warning": {
|
||||
"cannot-get-route": "Error getting route URL",
|
||||
"invalid-route-from": "Start marker is too far from a route.",
|
||||
"invalid-route-to": "Destination marker is too far from a route.",
|
||||
"no-response": "no response from server",
|
||||
"no-route-found": "Error: cannot find a route for given points. Maybe try to move them closer to roads?",
|
||||
"profile-error": "Profile error: no or empty response from server",
|
||||
|
|
|
|||
|
|
@ -94,6 +94,8 @@
|
|||
"delete-nogo-areas": "Minden elkerülendő terület törlése",
|
||||
"delete-pois": "Minden érdekes pont (POI) törlése",
|
||||
"delete-route": "Útvonal törlése",
|
||||
"draw-circlego-start": "Draw limited {{radius}}km go-to zone",
|
||||
"draw-circlego-stop": "Stop drawing limited {{radius}}km go-to zone",
|
||||
"draw-poi-start": "Érdekes pontok (POI-k) rajzolása",
|
||||
"draw-poi-stop": "Érdekes pontok rajzolásának megszakítása",
|
||||
"draw-route-start": "Útvonal rajzolása",
|
||||
|
|
@ -267,6 +269,8 @@
|
|||
},
|
||||
"warning": {
|
||||
"cannot-get-route": "Hiba történt az útvonal URL-jének beolvasásakor",
|
||||
"invalid-route-from": "Start marker is too far from a route.",
|
||||
"invalid-route-to": "Destination marker is too far from a route.",
|
||||
"no-response": "a kiszolgáló nem válaszol",
|
||||
"no-route-found": "Hiba: az adott pontokhoz nem sikerül útvonalat találni. Esetleg próbálja meg közelebb tenni őket az utakhoz.",
|
||||
"profile-error": "Profilhiba: a kiszolgáló nem válaszol vagy üres választ küld",
|
||||
|
|
|
|||
|
|
@ -94,6 +94,8 @@
|
|||
"delete-nogo-areas": "Eyða öllum bannsvæðum",
|
||||
"delete-pois": "Eyða öllum merkisstöðum",
|
||||
"delete-route": "Eyða leið",
|
||||
"draw-circlego-start": "Draw limited {{radius}}km go-to zone",
|
||||
"draw-circlego-stop": "Stop drawing limited {{radius}}km go-to zone",
|
||||
"draw-poi-start": "Draw points of interest",
|
||||
"draw-poi-stop": "Stop drawing points of interest",
|
||||
"draw-route-start": "Teikna leið",
|
||||
|
|
@ -258,7 +260,7 @@
|
|||
"explainpoi": "(show waypoints as POI's)",
|
||||
"explaintracklayer": "(show Track as separate Layer)",
|
||||
"file": "Trackfile",
|
||||
"fuzziness": "fuzzines",
|
||||
"fuzziness": "fuzziness",
|
||||
"pleasewait": "Please wait!",
|
||||
"showpois": "POI's",
|
||||
"title": "Load Track as Route",
|
||||
|
|
@ -267,6 +269,8 @@
|
|||
},
|
||||
"warning": {
|
||||
"cannot-get-route": "Villa við að ná í URL-slóð leiðar",
|
||||
"invalid-route-from": "Start marker is too far from a route.",
|
||||
"invalid-route-to": "Destination marker is too far from a route.",
|
||||
"no-response": "ekkert svar frá netþjóni",
|
||||
"no-route-found": "Villa: fann ekki leið fyrir uppgefna punkta. Kannski ættirðu að prófa að færa þá nær vegum?",
|
||||
"profile-error": "Villa í notkunarsniði: ekkert eða tómt svar frá netþjóni",
|
||||
|
|
|
|||
|
|
@ -94,6 +94,8 @@
|
|||
"delete-nogo-areas": "Slett alle no-go områder",
|
||||
"delete-pois": "Slett alle interessepunkter",
|
||||
"delete-route": "Slett rute",
|
||||
"draw-circlego-start": "Draw limited {{radius}}km go-to zone",
|
||||
"draw-circlego-stop": "Stop drawing limited {{radius}}km go-to zone",
|
||||
"draw-poi-start": "Draw points of interest",
|
||||
"draw-poi-stop": "Stop drawing points of interest",
|
||||
"draw-route-start": "Draw route",
|
||||
|
|
@ -258,7 +260,7 @@
|
|||
"explainpoi": "(show waypoints as POI's)",
|
||||
"explaintracklayer": "(show Track as separate Layer)",
|
||||
"file": "Trackfile",
|
||||
"fuzziness": "fuzzines",
|
||||
"fuzziness": "fuzziness",
|
||||
"pleasewait": "Please wait!",
|
||||
"showpois": "POI's",
|
||||
"title": "Load Track as Route",
|
||||
|
|
@ -267,6 +269,8 @@
|
|||
},
|
||||
"warning": {
|
||||
"cannot-get-route": "Feil under mottak av rute-URL",
|
||||
"invalid-route-from": "Start marker is too far from a route.",
|
||||
"invalid-route-to": "Destination marker is too far from a route.",
|
||||
"no-response": "ingen svar fra serveren",
|
||||
"no-route-found": "Error: cannot find a route for given points. Maybe try to move them closer to roads?",
|
||||
"profile-error": "Profile error: no or empty response from server",
|
||||
|
|
|
|||
|
|
@ -94,6 +94,8 @@
|
|||
"delete-nogo-areas": "Verwijder alle no-go gebieden",
|
||||
"delete-pois": "Delete all points of interest",
|
||||
"delete-route": "Verwijder route",
|
||||
"draw-circlego-start": "Draw limited {{radius}}km go-to zone",
|
||||
"draw-circlego-stop": "Stop drawing limited {{radius}}km go-to zone",
|
||||
"draw-poi-start": "Draw points of interest",
|
||||
"draw-poi-stop": "Stop drawing points of interest",
|
||||
"draw-route-start": "Teken route",
|
||||
|
|
@ -258,7 +260,7 @@
|
|||
"explainpoi": "(show waypoints as POI's)",
|
||||
"explaintracklayer": "(show Track as separate Layer)",
|
||||
"file": "Trackfile",
|
||||
"fuzziness": "fuzzines",
|
||||
"fuzziness": "fuzziness",
|
||||
"pleasewait": "Please wait!",
|
||||
"showpois": "POI's",
|
||||
"title": "Load Track as Route",
|
||||
|
|
@ -267,6 +269,8 @@
|
|||
},
|
||||
"warning": {
|
||||
"cannot-get-route": "Fout bij ophalen route URL",
|
||||
"invalid-route-from": "Start marker is too far from a route.",
|
||||
"invalid-route-to": "Destination marker is too far from a route.",
|
||||
"no-response": "geen antwoord van server",
|
||||
"no-route-found": "Fout: Kan geen route vinden voor de gegeven punten.\nProbeer de punten dichter bij wegen te plaatsen",
|
||||
"profile-error": "Profielfout: geen of leeg antwoord van server",
|
||||
|
|
|
|||
|
|
@ -94,6 +94,8 @@
|
|||
"delete-nogo-areas": "Usuń wszystkie strefy no-go",
|
||||
"delete-pois": "Usuń wszystkie punkty zainteresowania",
|
||||
"delete-route": "Usunąć trasę?",
|
||||
"draw-circlego-start": "Draw limited {{radius}}km go-to zone",
|
||||
"draw-circlego-stop": "Stop drawing limited {{radius}}km go-to zone",
|
||||
"draw-poi-start": "Draw points of interest",
|
||||
"draw-poi-stop": "Stop drawing points of interest",
|
||||
"draw-route-start": "Draw route",
|
||||
|
|
@ -258,7 +260,7 @@
|
|||
"explainpoi": "(show waypoints as POI's)",
|
||||
"explaintracklayer": "(show Track as separate Layer)",
|
||||
"file": "Trackfile",
|
||||
"fuzziness": "fuzzines",
|
||||
"fuzziness": "fuzziness",
|
||||
"pleasewait": "Please wait!",
|
||||
"showpois": "POI's",
|
||||
"title": "Load Track as Route",
|
||||
|
|
@ -267,6 +269,8 @@
|
|||
},
|
||||
"warning": {
|
||||
"cannot-get-route": "Błąd pobierania URL trasy",
|
||||
"invalid-route-from": "Start marker is too far from a route.",
|
||||
"invalid-route-to": "Destination marker is too far from a route.",
|
||||
"no-response": "brak odpowiedzi z serwera",
|
||||
"no-route-found": "Błąd: nie można znaleźć trasy dla zadanych punktów. Spróbuj przesunąć je bliżej dróg.",
|
||||
"profile-error": "Błąd profilu: brak lub pusta odpowiedź z serwera",
|
||||
|
|
|
|||
|
|
@ -94,6 +94,8 @@
|
|||
"delete-nogo-areas": "Delete all no-go areas",
|
||||
"delete-pois": "Delete all points of interest",
|
||||
"delete-route": "Delete route",
|
||||
"draw-circlego-start": "Draw limited {{radius}}km go-to zone",
|
||||
"draw-circlego-stop": "Stop drawing limited {{radius}}km go-to zone",
|
||||
"draw-poi-start": "Draw points of interest",
|
||||
"draw-poi-stop": "Stop drawing points of interest",
|
||||
"draw-route-start": "Draw route",
|
||||
|
|
@ -258,7 +260,7 @@
|
|||
"explainpoi": "(show waypoints as POI's)",
|
||||
"explaintracklayer": "(show Track as separate Layer)",
|
||||
"file": "Trackfile",
|
||||
"fuzziness": "fuzzines",
|
||||
"fuzziness": "fuzziness",
|
||||
"pleasewait": "Please wait!",
|
||||
"showpois": "POI's",
|
||||
"title": "Load Track as Route",
|
||||
|
|
@ -267,6 +269,8 @@
|
|||
},
|
||||
"warning": {
|
||||
"cannot-get-route": "Error getting route URL",
|
||||
"invalid-route-from": "Start marker is too far from a route.",
|
||||
"invalid-route-to": "Destination marker is too far from a route.",
|
||||
"no-response": "no response from server",
|
||||
"no-route-found": "Error: cannot find a route for given points. Maybe try to move them closer to roads?",
|
||||
"profile-error": "Profile error: no or empty response from server",
|
||||
|
|
|
|||
|
|
@ -94,6 +94,8 @@
|
|||
"delete-nogo-areas": "Удалить все запретные зоны",
|
||||
"delete-pois": "Delete all points of interest",
|
||||
"delete-route": "Удалить маршрут",
|
||||
"draw-circlego-start": "Draw limited {{radius}}km go-to zone",
|
||||
"draw-circlego-stop": "Stop drawing limited {{radius}}km go-to zone",
|
||||
"draw-poi-start": "Draw points of interest",
|
||||
"draw-poi-stop": "Stop drawing points of interest",
|
||||
"draw-route-start": "Draw route",
|
||||
|
|
@ -258,7 +260,7 @@
|
|||
"explainpoi": "(show waypoints as POI's)",
|
||||
"explaintracklayer": "(show Track as separate Layer)",
|
||||
"file": "Trackfile",
|
||||
"fuzziness": "fuzzines",
|
||||
"fuzziness": "fuzziness",
|
||||
"pleasewait": "Please wait!",
|
||||
"showpois": "POI's",
|
||||
"title": "Load Track as Route",
|
||||
|
|
@ -267,6 +269,8 @@
|
|||
},
|
||||
"warning": {
|
||||
"cannot-get-route": "Ошибка при получении URL маршрута",
|
||||
"invalid-route-from": "Start marker is too far from a route.",
|
||||
"invalid-route-to": "Destination marker is too far from a route.",
|
||||
"no-response": "сервер не отвечает",
|
||||
"no-route-found": "Ошибка: не удается найти маршрут для заданных точек. Может быть, попытаться переместить их ближе к дорогам?",
|
||||
"profile-error": "Ошибка профиля: не удалось получить ответ сервера либо получен пустой ответ.",
|
||||
|
|
|
|||
|
|
@ -94,6 +94,8 @@
|
|||
"delete-nogo-areas": "Delete all no-go areas",
|
||||
"delete-pois": "Delete all points of interest",
|
||||
"delete-route": "Delete route",
|
||||
"draw-circlego-start": "Draw limited {{radius}}km go-to zone",
|
||||
"draw-circlego-stop": "Stop drawing limited {{radius}}km go-to zone",
|
||||
"draw-poi-start": "Draw points of interest",
|
||||
"draw-poi-stop": "Stop drawing points of interest",
|
||||
"draw-route-start": "Draw route",
|
||||
|
|
@ -258,7 +260,7 @@
|
|||
"explainpoi": "(show waypoints as POI's)",
|
||||
"explaintracklayer": "(show Track as separate Layer)",
|
||||
"file": "Trackfile",
|
||||
"fuzziness": "fuzzines",
|
||||
"fuzziness": "fuzziness",
|
||||
"pleasewait": "Please wait!",
|
||||
"showpois": "POI's",
|
||||
"title": "Load Track as Route",
|
||||
|
|
@ -267,6 +269,8 @@
|
|||
},
|
||||
"warning": {
|
||||
"cannot-get-route": "Error getting route URL",
|
||||
"invalid-route-from": "Start marker is too far from a route.",
|
||||
"invalid-route-to": "Destination marker is too far from a route.",
|
||||
"no-response": "no response from server",
|
||||
"no-route-found": "Error: cannot find a route for given points. Maybe try to move them closer to roads?",
|
||||
"profile-error": "Profile error: no or empty response from server",
|
||||
|
|
|
|||
|
|
@ -94,6 +94,8 @@
|
|||
"delete-nogo-areas": "Delete all no-go areas",
|
||||
"delete-pois": "Delete all points of interest",
|
||||
"delete-route": "Delete route",
|
||||
"draw-circlego-start": "Draw limited {{radius}}km go-to zone",
|
||||
"draw-circlego-stop": "Stop drawing limited {{radius}}km go-to zone",
|
||||
"draw-poi-start": "Draw points of interest",
|
||||
"draw-poi-stop": "Stop drawing points of interest",
|
||||
"draw-route-start": "Draw route",
|
||||
|
|
@ -258,7 +260,7 @@
|
|||
"explainpoi": "(show waypoints as POI's)",
|
||||
"explaintracklayer": "(show Track as separate Layer)",
|
||||
"file": "Trackfile",
|
||||
"fuzziness": "fuzzines",
|
||||
"fuzziness": "fuzziness",
|
||||
"pleasewait": "Please wait!",
|
||||
"showpois": "POI's",
|
||||
"title": "Load Track as Route",
|
||||
|
|
@ -267,6 +269,8 @@
|
|||
},
|
||||
"warning": {
|
||||
"cannot-get-route": "取得路線URL時發生錯誤",
|
||||
"invalid-route-from": "Start marker is too far from a route.",
|
||||
"invalid-route-to": "Destination marker is too far from a route.",
|
||||
"no-response": "伺服器沒有回應",
|
||||
"no-route-found": "錯誤: 無法就給予的端點建立路線。或者嘗試將它們移近至道路附近?",
|
||||
"profile-error": "設定檔錯誤: 伺服器回傳空值或沒有回應",
|
||||
|
|
|
|||
53
package.json
53
package.json
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "brouter-web",
|
||||
"version": "0.13.0",
|
||||
"version": "0.14.0",
|
||||
"description": "Web client for BRouter",
|
||||
"main": "js/index.js",
|
||||
"scripts": {
|
||||
|
|
@ -50,9 +50,9 @@
|
|||
"datatables": "~1.10.18",
|
||||
"font-awesome": "^4.7.0",
|
||||
"geo-data-exchange": "alexcojocaru/geo-data-exchange#v1.1.0",
|
||||
"i18next": "^15.0.4",
|
||||
"i18next-browser-languagedetector": "^3.0.1",
|
||||
"i18next-xhr-backend": "^2.0.1",
|
||||
"i18next": "^19.8.4",
|
||||
"i18next-browser-languagedetector": "^6.0.1",
|
||||
"i18next-xhr-backend": "^3.2.2",
|
||||
"jquery": "3.5.1",
|
||||
"jquery-i18next": "^1.2.1",
|
||||
"jstree": "^3.3.8",
|
||||
|
|
@ -73,47 +73,46 @@
|
|||
"leaflet.snogylop": "^0.4.0",
|
||||
"leaflet.stravasegments": "2.3.2",
|
||||
"mapbbcode": "MapBBCode/mapbbcode#v1.2.0",
|
||||
"promise-polyfill": "^8.1.0",
|
||||
"tether": "1.4.5",
|
||||
"promise-polyfill": "^8.2.0",
|
||||
"url-search-params": "~0.5.0",
|
||||
"whatwg-fetch": "^3.0.0"
|
||||
"whatwg-fetch": "^3.5.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"autoprefixer": "^8.1.0",
|
||||
"browser-sync": "^2.26.7",
|
||||
"browser-sync": "^2.26.13",
|
||||
"del": "^1.1.1",
|
||||
"eslint": "^6.6.0",
|
||||
"eslint": "^7.15.0",
|
||||
"eslint-plugin-compat": "^3.3.0",
|
||||
"gulp": "^4.0.2",
|
||||
"gulp-bump": "^2.7.0",
|
||||
"gulp-bump": "^3.2.0",
|
||||
"gulp-cached": "^1.0.4",
|
||||
"gulp-clean-css": "^4.0.0",
|
||||
"gulp-clean-css": "^4.3.0",
|
||||
"gulp-concat": "^2.5.2",
|
||||
"gulp-confirm": "^1.0.6",
|
||||
"gulp-debug": "^2.0.1",
|
||||
"gulp-git": "^2.2.0",
|
||||
"gulp-debug": "^4.0.0",
|
||||
"gulp-git": "^2.10.1",
|
||||
"gulp-github-release": "^1.2.1",
|
||||
"gulp-if": "^2.0.0",
|
||||
"gulp-inject": "^1.2.0",
|
||||
"gulp-if": "^3.0.0",
|
||||
"gulp-inject": "^5.0.5",
|
||||
"gulp-json-concat": "^0.1.1",
|
||||
"gulp-modify-css-urls": "^2.0.0",
|
||||
"gulp-postcss": "^7.0.1",
|
||||
"gulp-remember": "^0.3.0",
|
||||
"gulp-rename": "^1.4.0",
|
||||
"gulp-replace": "^0.5.4",
|
||||
"gulp-sourcemaps": "^1.5.1",
|
||||
"gulp-uglify": "^1.1.0",
|
||||
"gulp-postcss": "^9.0.0",
|
||||
"gulp-remember": "^1.0.1",
|
||||
"gulp-rename": "^2.0.0",
|
||||
"gulp-replace": "^1.0.0",
|
||||
"gulp-sourcemaps": "^3.0.0",
|
||||
"gulp-uglify": "^3.0.2",
|
||||
"gulp-util": "^3.0.7",
|
||||
"gulp-zip": "^4.0.0",
|
||||
"husky": "^2.3.0",
|
||||
"i18next-scanner": "^2.9.1",
|
||||
"gulp-zip": "^5.0.2",
|
||||
"husky": "^4.3.4",
|
||||
"i18next-scanner": "^3.0.0",
|
||||
"merge-stream": "^2.0.0",
|
||||
"node-fetch": "^2.6.1",
|
||||
"npmfiles": "^0.1.1",
|
||||
"npmfiles": "^0.1.3",
|
||||
"patch-package": "~6.2.2",
|
||||
"postinstall-postinstall": "~2.1.0",
|
||||
"prettier": "^1.17.1",
|
||||
"pretty-quick": "^1.10.0"
|
||||
"prettier": "^2.2.1",
|
||||
"pretty-quick": "^3.1.0"
|
||||
},
|
||||
"overrides": {
|
||||
"leaflet": {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue