Increase file size limit for tracks, configurable

(abrensch/brouter#295)
This commit is contained in:
Norbert Renner 2021-03-25 10:31:05 +01:00
parent 5f0f155e5f
commit dd34064e8c
2 changed files with 4 additions and 1 deletions

View file

@ -129,4 +129,7 @@
BR.conf.tracknameAllowedChars = 'a-zA-Z0-9 \\._\\-'; BR.conf.tracknameAllowedChars = 'a-zA-Z0-9 \\._\\-';
BR.conf.overpassBaseUrl = 'https://overpass.kumi.systems/api/interpreter'; BR.conf.overpassBaseUrl = 'https://overpass.kumi.systems/api/interpreter';
// File size limit in kb for loading tracks
BR.conf.trackSizeLimit = 1024 * 10;
})(); })();

View file

@ -13,7 +13,7 @@ BR.tracksLoader = function (map, layersControl, routing, pois) {
layerOptions: BR.Track.getGeoJsonOptions(layersControl), layerOptions: BR.Track.getGeoJsonOptions(layersControl),
addToMap: false, addToMap: false,
// File size limit in kb (default: 1024) ? // File size limit in kb (default: 1024) ?
fileSizeLimit: 1024, fileSizeLimit: BR.conf.trackSizeLimit || 1024 * 10,
shortcut: { shortcut: {
open: 79, // char code for 'o' open: 79, // char code for 'o'
}, },