Rename hiking-beta profile to hiking-mountain

- remove " (beta)" in locale text, stick to plain "Hiking" as long as we have only one and base parameters stay the same
- map hash for old URLs
This commit is contained in:
Norbert Renner 2022-05-23 11:34:03 +02:00
parent 84fa50b5c2
commit 5cc64015b9
4 changed files with 17 additions and 4 deletions

View file

@ -95,7 +95,7 @@ L.BRouter = L.Class.extend({
opts.alternative = params.alternativeidx;
}
if (params.profile) {
opts.profile = params.profile;
opts.profile = this._parseProfile(params.profile);
}
if (params.pois) {
opts.pois = this._parseLonLatNames(params.pois);
@ -498,6 +498,14 @@ L.BRouter = L.Class.extend({
return nogos;
},
_parseProfile: function (profile) {
if (BR.conf.profilesRename?.[profile]) {
return BR.conf.profilesRename[profile];
}
return profile;
},
// formats L.LatLng object as lng,lat string
_formatLatLng: function (latLng) {
var s = '';