Refactor layer configs into separate files (#146)
This commit is contained in:
parent
e0120239a3
commit
753de596c6
8 changed files with 1849 additions and 1824 deletions
16
gulpfile.js
16
gulpfile.js
|
|
@ -58,6 +58,13 @@ var paths = {
|
||||||
locales: 'locales/*.json',
|
locales: 'locales/*.json',
|
||||||
layers: 'layers/**/*.geojson',
|
layers: 'layers/**/*.geojson',
|
||||||
layersDestName: 'layers.js',
|
layersDestName: 'layers.js',
|
||||||
|
layersConfig: [
|
||||||
|
'layers/config/config.js',
|
||||||
|
'layers/config/tree.js',
|
||||||
|
'layers/config/overrides.js',
|
||||||
|
'layers/config/geometry.js'
|
||||||
|
],
|
||||||
|
layersConfigDestName: 'layersConf.js',
|
||||||
dest: 'dist',
|
dest: 'dist',
|
||||||
destName: 'brouter-web'
|
destName: 'brouter-web'
|
||||||
};
|
};
|
||||||
|
|
@ -145,6 +152,7 @@ gulp.task('watch', function() {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
gulp.watch(paths.styles, ['styles']);
|
gulp.watch(paths.styles, ['styles']);
|
||||||
|
gulp.watch(paths.layersConfig, ['layers_config']);
|
||||||
});
|
});
|
||||||
|
|
||||||
// Print paths to console, for manually debugging the gulp build
|
// Print paths to console, for manually debugging the gulp build
|
||||||
|
|
@ -278,8 +286,14 @@ gulp.task('i18next', function() {
|
||||||
.pipe(gulp.dest('.'));
|
.pipe(gulp.dest('.'));
|
||||||
})
|
})
|
||||||
|
|
||||||
|
gulp.task('layers_config', function () {
|
||||||
|
return gulp.src(paths.layersConfig)
|
||||||
|
.pipe(concat(paths.layersConfigDestName))
|
||||||
|
.pipe(gulp.dest(paths.dest));
|
||||||
|
});
|
||||||
|
|
||||||
// Bundles layer files. To download and extract run "yarn layers"
|
// Bundles layer files. To download and extract run "yarn layers"
|
||||||
gulp.task('layers', function () {
|
gulp.task('layers', ['layers_config'], function () {
|
||||||
return gulp.src(paths.layers)
|
return gulp.src(paths.layers)
|
||||||
// Workaround to get file extension removed from the dictionary key
|
// Workaround to get file extension removed from the dictionary key
|
||||||
.pipe(rename({ extname: ".json" }))
|
.pipe(rename({ extname: ".json" }))
|
||||||
|
|
|
||||||
|
|
@ -340,6 +340,7 @@
|
||||||
<script src="config.js"></script>
|
<script src="config.js"></script>
|
||||||
<script src="keys.js"></script>
|
<script src="keys.js"></script>
|
||||||
<script src="dist/layers.js"></script>
|
<script src="dist/layers.js"></script>
|
||||||
|
<script src="dist/layersConf.js"></script>
|
||||||
|
|
||||||
<!-- "gulp inject" for debugging -->
|
<!-- "gulp inject" for debugging -->
|
||||||
<!-- inject:js -->
|
<!-- inject:js -->
|
||||||
|
|
|
||||||
1717
js/LayersConfig.js
1717
js/LayersConfig.js
File diff suppressed because it is too large
Load diff
|
|
@ -13,96 +13,45 @@ BR.LayersTab = BR.ControlLayers.extend({
|
||||||
this._map = map;
|
this._map = map;
|
||||||
this.onAdd(map);
|
this.onAdd(map);
|
||||||
|
|
||||||
var layerIndex = BR.layerIndex;
|
|
||||||
|
|
||||||
L.DomUtil.get('layers-control-wrapper').appendChild(this._section);
|
L.DomUtil.get('layers-control-wrapper').appendChild(this._section);
|
||||||
|
|
||||||
this.initButtons();
|
this.initButtons();
|
||||||
|
this.initJsTree();
|
||||||
|
|
||||||
var structure = {
|
return this;
|
||||||
'base-layers': {
|
},
|
||||||
'worldwide-international': [
|
|
||||||
'standard',
|
initButtons: function () {
|
||||||
'OpenTopoMap',
|
var expandTree = function (e) {
|
||||||
'Stamen.Terrain',
|
this.jstree.open_all();
|
||||||
'Esri.WorldImagery',
|
};
|
||||||
'wikimedia-map',
|
var collapseTree = function (e) {
|
||||||
'HDM_HOT',
|
this.jstree.close_all();
|
||||||
'1010', // OpenStreetMap.se (Hydda.Full)
|
};
|
||||||
'opencylemap',
|
|
||||||
'1061', // Thunderforest Outdoors
|
var toggleOptionalLayers = function (e) {
|
||||||
'1065', // Hike & Bike Map
|
var button = L.DomUtil.get('optional_layers_button');
|
||||||
'1016', // 4UMaps,
|
var treeButtons = L.DomUtil.get('tree-button-group');
|
||||||
'openmapsurfer'
|
var div = L.DomUtil.get('optional-layers-tree');
|
||||||
],
|
|
||||||
'worldwide-monolingual': [
|
div.hidden = !div.hidden;
|
||||||
'osm-mapnik-german_style',
|
treeButtons.hidden = !treeButtons.hidden;
|
||||||
'osmfr',
|
button.classList.toggle('active');
|
||||||
'1017', // Osmapa.pl - Mapa OpenStreetMap Polska
|
|
||||||
'1023', // kosmosnimki.ru
|
if (div.hidden) {
|
||||||
'1021' // sputnik.ru
|
this.deselectNode();
|
||||||
],
|
|
||||||
'europe': [
|
|
||||||
'MtbMap',
|
|
||||||
'1069' // MRI (maps.refuges.info)
|
|
||||||
],
|
|
||||||
'europe-monolingual': [
|
|
||||||
'osmfr-basque',
|
|
||||||
'osmfr-breton',
|
|
||||||
'osmfr-occitan'
|
|
||||||
],
|
|
||||||
'country': [
|
|
||||||
{
|
|
||||||
'BE': [
|
|
||||||
'osmbe',
|
|
||||||
'osmbe-fr',
|
|
||||||
'osmbe-nl',
|
|
||||||
]
|
|
||||||
},
|
|
||||||
'OpenStreetMap.CH',
|
|
||||||
'topplus-open',
|
|
||||||
'OpenStreetMap-turistautak',
|
|
||||||
{
|
|
||||||
'IL': [
|
|
||||||
'Israel_Hiking',
|
|
||||||
'Israel_MTB',
|
|
||||||
]
|
|
||||||
},
|
|
||||||
'mtbmap-no',
|
|
||||||
{
|
|
||||||
'SK': [
|
|
||||||
'Freemap.sk-Car',
|
|
||||||
'Freemap.sk-Hiking',
|
|
||||||
'Freemap.sk-Cyclo',
|
|
||||||
]
|
|
||||||
},
|
|
||||||
'osm-cambodia_laos_thailand_vietnam-bilingual'
|
|
||||||
]
|
|
||||||
},
|
|
||||||
'overlays': {
|
|
||||||
'worldwide': [
|
|
||||||
'HikeBike.HillShading',
|
|
||||||
'Waymarked_Trails-Cycling',
|
|
||||||
'Waymarked_Trails-Hiking',
|
|
||||||
'Waymarked_Trails-MTB',
|
|
||||||
'mapillary-coverage-raster'
|
|
||||||
],
|
|
||||||
'country': [
|
|
||||||
'historic-place-contours',
|
|
||||||
'hu-hillshade',
|
|
||||||
{
|
|
||||||
'PL': [
|
|
||||||
'mapaszlakow-cycle',
|
|
||||||
'mapaszlakow-bike',
|
|
||||||
'mapaszlakow-hike',
|
|
||||||
'mapaszlakow-mtb',
|
|
||||||
'mapaszlakow-incline'
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
var treeData = this.toJsTree(structure);
|
|
||||||
|
L.DomUtil.get('expand_tree_button').onclick = L.bind(expandTree, this);
|
||||||
|
L.DomUtil.get('collapse_tree_button').onclick = L.bind(collapseTree, this);
|
||||||
|
|
||||||
|
L.DomUtil.get('optional_layers_button').onclick = L.bind(toggleOptionalLayers, this);
|
||||||
|
},
|
||||||
|
|
||||||
|
initJsTree: function () {
|
||||||
|
var layerIndex = BR.layerIndex;
|
||||||
|
var treeData = this.toJsTree(BR.confLayers.tree);
|
||||||
var oldSelected = null;
|
var oldSelected = null;
|
||||||
|
|
||||||
var onSelectNode = function (e, data) {
|
var onSelectNode = function (e, data) {
|
||||||
|
|
@ -177,36 +126,6 @@ BR.LayersTab = BR.ControlLayers.extend({
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.jstree = $('#optional-layers-tree').jstree(true);
|
this.jstree = $('#optional-layers-tree').jstree(true);
|
||||||
|
|
||||||
return this;
|
|
||||||
},
|
|
||||||
|
|
||||||
initButtons: function () {
|
|
||||||
var expandTree = function (e) {
|
|
||||||
this.jstree.open_all();
|
|
||||||
};
|
|
||||||
var collapseTree = function (e) {
|
|
||||||
this.jstree.close_all();
|
|
||||||
};
|
|
||||||
|
|
||||||
var toggleOptionalLayers = function (e) {
|
|
||||||
var button = L.DomUtil.get('optional_layers_button');
|
|
||||||
var treeButtons = L.DomUtil.get('tree-button-group');
|
|
||||||
var div = L.DomUtil.get('optional-layers-tree');
|
|
||||||
|
|
||||||
div.hidden = !div.hidden;
|
|
||||||
treeButtons.hidden = !treeButtons.hidden;
|
|
||||||
button.classList.toggle('active');
|
|
||||||
|
|
||||||
if (div.hidden) {
|
|
||||||
this.deselectNode();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
L.DomUtil.get('expand_tree_button').onclick = L.bind(expandTree, this);
|
|
||||||
L.DomUtil.get('collapse_tree_button').onclick = L.bind(collapseTree, this);
|
|
||||||
|
|
||||||
L.DomUtil.get('optional_layers_button').onclick = L.bind(toggleOptionalLayers, this);
|
|
||||||
},
|
},
|
||||||
|
|
||||||
toJsTree: function (layerTree) {
|
toJsTree: function (layerTree) {
|
||||||
|
|
|
||||||
32
layers/config/config.js
Normal file
32
layers/config/config.js
Normal file
|
|
@ -0,0 +1,32 @@
|
||||||
|
BR.confLayers = {};
|
||||||
|
|
||||||
|
BR.confLayers.defaultBaseLayers = [
|
||||||
|
'standard',
|
||||||
|
'osm-mapnik-german_style',
|
||||||
|
'OpenTopoMap',
|
||||||
|
'Stamen.Terrain',
|
||||||
|
'Esri.WorldImagery'
|
||||||
|
];
|
||||||
|
|
||||||
|
BR.confLayers.defaultOverlays = [
|
||||||
|
'HikeBike.HillShading',
|
||||||
|
'Waymarked_Trails-Cycling',
|
||||||
|
'Waymarked_Trails-Hiking'
|
||||||
|
];
|
||||||
|
|
||||||
|
BR.confLayers.legacyNameToIdMap = {
|
||||||
|
'OpenStreetMap': 'standard',
|
||||||
|
'OpenStreetMap.de': 'osm-mapnik-german_style',
|
||||||
|
'OpenTopoMap': 'OpenTopoMap',
|
||||||
|
'Esri World Imagery': 'Esri.WorldImagery',
|
||||||
|
'Cycling (Waymarked Trails)': 'Waymarked_Trails-Cycling',
|
||||||
|
'Hiking (Waymarked Trails)': 'Waymarked_Trails-Hiking'
|
||||||
|
};
|
||||||
|
|
||||||
|
BR.confLayers.leafletProvidersIncludeList = [
|
||||||
|
'Stamen.Terrain',
|
||||||
|
'MtbMap',
|
||||||
|
'OpenStreetMap.CH',
|
||||||
|
'HikeBike.HillShading',
|
||||||
|
'Esri.WorldImagery'
|
||||||
|
];
|
||||||
1445
layers/config/geometry.js
Normal file
1445
layers/config/geometry.js
Normal file
File diff suppressed because it is too large
Load diff
232
layers/config/overrides.js
Normal file
232
layers/config/overrides.js
Normal file
|
|
@ -0,0 +1,232 @@
|
||||||
|
BR.confLayers.getPropertyOverrides = function() {
|
||||||
|
return {
|
||||||
|
'standard': {
|
||||||
|
'name': i18next.t('map.layer.osm'),
|
||||||
|
'attribution': {
|
||||||
|
'html': '© <a target="_blank" href="https://www.openstreetmap.org/copyright">openstreetmap.org</a>, <a target="_blank" href="https://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA 2.0</a>'
|
||||||
|
},
|
||||||
|
'mapUrl': 'https://www.openstreetmap.org/#map={zoom}/{lat}/{lon}'
|
||||||
|
},
|
||||||
|
'OpenTopoMap': {
|
||||||
|
'name': i18next.t('map.layer.topo'),
|
||||||
|
'attribution': {
|
||||||
|
'html': '© <a target="_blank" href="https://opentopomap.org/about#verwendung">OpenTopoMap</a>, <a target="_blank" href="https://creativecommons.org/licenses/by-sa/3.0/">CC-BY-SA 3.0</a>; <a target="_blank" href="http://viewfinderpanoramas.org">SRTM</a>'
|
||||||
|
},
|
||||||
|
'mapUrl': 'https://opentopomap.org/#map={zoom}/{lat}/{lon}'
|
||||||
|
},
|
||||||
|
'Stamen.Terrain': {
|
||||||
|
'name': i18next.t('map.layer.stamen-terrain'),
|
||||||
|
'attribution': '© <a href="http://stamen.com">Stamen Design</a>, <a href="http://creativecommons.org/licenses/by/3.0">CC BY 3.0</a>',
|
||||||
|
'mapUrl': 'http://maps.stamen.com/#terrain/{zoom}/{lat}/{lon}'
|
||||||
|
},
|
||||||
|
'Esri.WorldImagery': {
|
||||||
|
'name': i18next.t('map.layer.esri'),
|
||||||
|
'nameShort': i18next.t('credits.esri-tiles'),
|
||||||
|
'attribution': i18next.t('credits.esri-license'),
|
||||||
|
'mapUrl': 'http://www.arcgis.com/home/item.html?id=10df2279f9684e4a9f6a7f08febac2a9'
|
||||||
|
},
|
||||||
|
'wikimedia-map': {
|
||||||
|
'mapUrl': 'https://maps.wikimedia.org/#{zoom}/{lat}/{lon}'
|
||||||
|
},
|
||||||
|
'HDM_HOT': {
|
||||||
|
'nameShort': 'HOT',
|
||||||
|
'mapUrl': 'http://map.hotosm.org/#{zoom}/{lat}/{lon}'
|
||||||
|
},
|
||||||
|
// OpenStreetMap.se (Hydda.Full)
|
||||||
|
'1010': {
|
||||||
|
'mapUrl': 'https://maps.openstreetmap.se/#{zoom}/{lat}/{lon}'
|
||||||
|
},
|
||||||
|
'opencylemap': {
|
||||||
|
'name': i18next.t('map.layer.cycle'),
|
||||||
|
'nameShort': 'OpenCycleMap',
|
||||||
|
// add Thunderforest API key variable
|
||||||
|
'url': 'https://{switch:a,b,c}.tile.thunderforest.com/cycle/{zoom}/{x}/{y}.png?apikey={keys_thunderforest}',
|
||||||
|
'mapUrl': 'https://www.opencyclemap.org/?zoom={zoom}&lat={lat}&lon={lon}&layers=B0000'
|
||||||
|
},
|
||||||
|
'1061': {
|
||||||
|
'name': i18next.t('map.layer.outdoors'),
|
||||||
|
'nameShort': 'Outdoors',
|
||||||
|
'url': 'http://{s}.tile.thunderforest.com/outdoors/{z}/{x}/{y}.png?apikey={keys_thunderforest}',
|
||||||
|
'mapUrl': 'https://www.opencyclemap.org/?zoom={zoom}&lat={lat}&lon={lon}&layers=000B0'
|
||||||
|
},
|
||||||
|
// Hike & Bike Map
|
||||||
|
'1065': {
|
||||||
|
'mapUrl': 'http://hikebikemap.org/?zoom={zoom}&lat={lat}&lon={lon}&layer=HikeBikeMap'
|
||||||
|
},
|
||||||
|
// 4UMaps
|
||||||
|
'1016': {
|
||||||
|
'mapUrl': 'https://www.4umaps.com/map.htm?zoom={zoom}&lat={lat}&lon={lon}&layers=B00'
|
||||||
|
},
|
||||||
|
'openmapsurfer': {
|
||||||
|
'mapUrl': 'https://maps.openrouteservice.org/directions?n1={lat}&n2={lon}&n3={zoom}&b=0&c=0&k1=en-US&k2=km'
|
||||||
|
},
|
||||||
|
'osm-mapnik-german_style': {
|
||||||
|
'name': i18next.t('map.layer.osmde'),
|
||||||
|
'language_code': 'de',
|
||||||
|
'attribution': {
|
||||||
|
'html': '© <a target="_blank" href="https://openstreetmap.de/karte.html">openstreetmap.de</a>'
|
||||||
|
},
|
||||||
|
'mapUrl': 'https://www.openstreetmap.de/karte.html?zoom={zoom}&lat={lat}&lon={lon}&layers=B000TF'
|
||||||
|
},
|
||||||
|
'osmfr': {
|
||||||
|
'language_code': 'fr',
|
||||||
|
'nameShort': 'OSM French',
|
||||||
|
'mapUrl': 'http://tile.openstreetmap.fr/?layers=B00000000FFFFFF&zoom={zoom}&lat={lat}&lon={lon}'
|
||||||
|
},
|
||||||
|
// Osmapa.pl - Mapa OpenStreetMap Polska
|
||||||
|
'1017': {
|
||||||
|
'language_code': 'pl',
|
||||||
|
'mapUrl': 'http://osmapa.pl/#lat={lat}&lon={lon}&z={zoom}&m=os'
|
||||||
|
},
|
||||||
|
// kosmosnimki.ru
|
||||||
|
'1023': {
|
||||||
|
'language_code': 'ru',
|
||||||
|
'mapUrl': 'http://kosmosnimki.ru/'
|
||||||
|
},
|
||||||
|
// sputnik.ru
|
||||||
|
'1021': {
|
||||||
|
'language_code': 'ru',
|
||||||
|
'mapUrl': 'http://maps.sputnik.ru/?lat={lat}&lng={lon}&zoom={zoom}'
|
||||||
|
},
|
||||||
|
'MtbMap': {
|
||||||
|
'mapUrl': 'http://mtbmap.cz/#zoom={zoom}&lat={lat}&lon={lon}',
|
||||||
|
'worldTiles': true // -z12
|
||||||
|
},
|
||||||
|
// MRI (maps.refuges.info)
|
||||||
|
'1069': {
|
||||||
|
'nameShort': 'Refuges.info',
|
||||||
|
'mapUrl': 'http://maps.refuges.info/?zoom={zoom}&lat={lat}&lon={lon}&layers=B',
|
||||||
|
'worldTiles': true
|
||||||
|
},
|
||||||
|
'osmfr-basque': {
|
||||||
|
'language_code': 'eu',
|
||||||
|
'nameShort': 'OSM Basque',
|
||||||
|
'mapUrl': 'http://tile.openstreetmap.fr/?layers=00000000BFFFFFF&zoom={zoom}&lat={lat}&lon={lon}',
|
||||||
|
'worldTiles': true
|
||||||
|
},
|
||||||
|
'osmfr-breton': {
|
||||||
|
'language_code': 'br',
|
||||||
|
'nameShort': 'OSM Breton',
|
||||||
|
'mapUrl': 'https://kartenn.openstreetmap.bzh/#map={zoom}/{lat}/{lon}',
|
||||||
|
'worldTiles': true
|
||||||
|
},
|
||||||
|
'osmfr-occitan': {
|
||||||
|
'language_code': 'oc',
|
||||||
|
'nameShort': 'OSM Occitan',
|
||||||
|
'mapUrl': 'http://tile.openstreetmap.fr/?layers=0000000B0FFFFFF&zoom={zoom}&lat={lat}&lon={lon}',
|
||||||
|
'worldTiles': true
|
||||||
|
},
|
||||||
|
'osmbe': {
|
||||||
|
'nameShort': 'OSM Belgium',
|
||||||
|
'mapUrl': 'https://tile.osm.be/#map={zoom}/{lat}/{lon}',
|
||||||
|
'worldTiles': true // -z7
|
||||||
|
},
|
||||||
|
'osmbe-fr': {
|
||||||
|
'nameShort': 'OSM Belgium (fr)',
|
||||||
|
'mapUrl': 'https://tile.osm.be/#map={zoom}/{lat}/{lon}',
|
||||||
|
'worldTiles': true // -z7
|
||||||
|
},
|
||||||
|
'osmbe-nl': {
|
||||||
|
'nameShort': 'OSM Belgium (nl)',
|
||||||
|
'mapUrl': 'https://tile.osm.be/#map={zoom}/{lat}/{lon}',
|
||||||
|
'worldTiles': true // -z7
|
||||||
|
},
|
||||||
|
'OpenStreetMap.CH': {
|
||||||
|
'country_code': 'CH',
|
||||||
|
'mapUrl': 'https://osm.ch/#{zoom}/{lat}/{lon}',
|
||||||
|
'worldTiles': true
|
||||||
|
},
|
||||||
|
'topplus-open': {
|
||||||
|
'country_code': 'DE',
|
||||||
|
'mapUrl': 'http://www.geodatenzentrum.de/geodaten/gdz_rahmen.gdz_div?gdz_spr=deu&gdz_user_id=0&gdz_akt_zeile=5&gdz_anz_zeile=1&gdz_unt_zeile=41',
|
||||||
|
'worldTiles': true // World -z9, Europe -z14
|
||||||
|
},
|
||||||
|
|
||||||
|
'OpenStreetMap-turistautak': {
|
||||||
|
'nameShort': 'OSM Turistautak',
|
||||||
|
'mapUrl': 'https://turistautak.openstreetmap.hu/?zoom={zoom}&lat={lat}&lon={lon}&layers=0B00F'
|
||||||
|
},
|
||||||
|
'Israel_Hiking': {
|
||||||
|
'mapUrl': 'https://israelhiking.osm.org.il/map/{zoom}/{lat}/{lon}'
|
||||||
|
},
|
||||||
|
'Israel_MTB': {
|
||||||
|
'mapUrl': 'https://israelhiking.osm.org.il/map/{zoom}/{lat}/{lon}'
|
||||||
|
},
|
||||||
|
'mtbmap-no': {
|
||||||
|
'mapUrl': 'https://mtbmap.no/#{zoom}/{lat}/{lon}'
|
||||||
|
},
|
||||||
|
'Freemap.sk-Car': {
|
||||||
|
'mapUrl': 'https://www.freemap.sk/?map={zoom}/{lat}/{lon}&layers=A'
|
||||||
|
},
|
||||||
|
'Freemap.sk-Hiking': {
|
||||||
|
'mapUrl': 'https://www.freemap.sk/?map={zoom}/{lat}/{lon}&layers=T'
|
||||||
|
},
|
||||||
|
'Freemap.sk-Cyclo': {
|
||||||
|
'mapUrl': 'https://www.freemap.sk/?map={zoom}/{lat}/{lon}&layers=C'
|
||||||
|
},
|
||||||
|
'osm-cambodia_laos_thailand_vietnam-bilingual': {
|
||||||
|
'country_code': 'TH+',
|
||||||
|
'nameShort': 'Thaimap',
|
||||||
|
'mapUrl': 'http://thaimap.osm-tools.org/?zoom={zoom}&lat={lat}&lon={lon}&layers=BT',
|
||||||
|
'worldTiles': true
|
||||||
|
},
|
||||||
|
'HikeBike.HillShading': {
|
||||||
|
'name': i18next.t('map.layer.hikebike-hillshading'),
|
||||||
|
'nameShort': i18next.t('map.hikebike-hillshading'),
|
||||||
|
'attribution': '© <a target="_blank" href="http://hikebikemap.org">hikebikemap.org</a>; SRTM3 v2 (<a target="_blank" href="http://www2.jpl.nasa.gov/srtm/">NASA</a>)',
|
||||||
|
'mapUrl': 'http://hikebikemap.org/?zoom={zoom}&lat={lat}&lon={lon}&layer=HikeBikeMap',
|
||||||
|
'overlay': true
|
||||||
|
},
|
||||||
|
'Waymarked_Trails-Cycling': {
|
||||||
|
'name': i18next.t('map.layer.cycling'),
|
||||||
|
'nameShort': i18next.t('map.cycling'),
|
||||||
|
'attribution': {
|
||||||
|
'html': '© <a target="_blank" href="https://cycling.waymarkedtrails.org/en/help/legal">waymarkedtrails.org</a>, <a target="_blank" href="https://creativecommons.org/licenses/by-sa/3.0/de/deed.en">CC-BY-SA 3.0 DE</a>'
|
||||||
|
},
|
||||||
|
'mapUrl': 'http://cycling.waymarkedtrails.org/#?map={zoom}!{lat}!{lon}'
|
||||||
|
},
|
||||||
|
'Waymarked_Trails-Hiking': {
|
||||||
|
'name': i18next.t('map.layer.hiking'),
|
||||||
|
'nameShort': i18next.t('map.hiking'),
|
||||||
|
'attribution': {
|
||||||
|
'html': '© <a target="_blank" href="https://hiking.waymarkedtrails.org/en/help/legal">waymarkedtrails.org</a>, <a target="_blank" href="https://creativecommons.org/licenses/by-sa/3.0/de/deed.en">CC-BY-SA 3.0 DE</a>'
|
||||||
|
},
|
||||||
|
'mapUrl': 'http://hiking.waymarkedtrails.org/#?map={zoom}!{lat}!{lon}'
|
||||||
|
},
|
||||||
|
'Waymarked_Trails-MTB': {
|
||||||
|
'nameShort': 'MTB',
|
||||||
|
'mapUrl': 'http://mtb.waymarkedtrails.org/#?map={zoom}!{lat}!{lon}'
|
||||||
|
},
|
||||||
|
'mapillary-coverage-raster': {
|
||||||
|
'nameShort': 'Mapillary',
|
||||||
|
'mapUrl': 'https://www.mapillary.com/app/?lat={lat}&lng={lon}&z={zoom}&menu=false'
|
||||||
|
},
|
||||||
|
'historic-place-contours': {
|
||||||
|
'mapUrl': 'http://gk.historic.place/historische_objekte/?zoom={zoom}&lat={lat}&lon={lon}&pid=GhHaSaHe'
|
||||||
|
},
|
||||||
|
'hu-hillshade': {
|
||||||
|
'nameShort': 'Hillshade HU',
|
||||||
|
'mapUrl': 'http://map.turistautak.hu/?zoom={zoom}&lat={lat}&lon={lon}&layers=0B000FTF'
|
||||||
|
},
|
||||||
|
'mapaszlakow-cycle': {
|
||||||
|
'nameShort': 'Cycleways PL',
|
||||||
|
'mapUrl': 'http://mapaszlakow.eu/#{zoom}/{lat}/{lon}'
|
||||||
|
},
|
||||||
|
'mapaszlakow-bike': {
|
||||||
|
'nameShort': 'Bicycle PL',
|
||||||
|
'mapUrl': 'http://mapaszlakow.eu/#{zoom}/{lat}/{lon}'
|
||||||
|
},
|
||||||
|
'mapaszlakow-hike': {
|
||||||
|
'nameShort': 'Hiking PL',
|
||||||
|
'mapUrl': 'http://mapaszlakow.eu/#{zoom}/{lat}/{lon}'
|
||||||
|
},
|
||||||
|
'mapaszlakow-mtb': {
|
||||||
|
'nameShort': 'MTB:scale PL',
|
||||||
|
'mapUrl': 'http://mapaszlakow.eu/#{zoom}/{lat}/{lon}'
|
||||||
|
},
|
||||||
|
'mapaszlakow-incline': {
|
||||||
|
'nameShort': 'Incline PL',
|
||||||
|
'mapUrl': 'http://mapaszlakow.eu/#{zoom}/{lat}/{lon}'
|
||||||
|
}
|
||||||
|
};
|
||||||
|
};
|
||||||
83
layers/config/tree.js
Normal file
83
layers/config/tree.js
Normal file
|
|
@ -0,0 +1,83 @@
|
||||||
|
BR.confLayers.tree = {
|
||||||
|
'base-layers': {
|
||||||
|
'worldwide-international': [
|
||||||
|
'standard',
|
||||||
|
'OpenTopoMap',
|
||||||
|
'Stamen.Terrain',
|
||||||
|
'Esri.WorldImagery',
|
||||||
|
'wikimedia-map',
|
||||||
|
'HDM_HOT',
|
||||||
|
'1010', // OpenStreetMap.se (Hydda.Full)
|
||||||
|
'opencylemap',
|
||||||
|
'1061', // Thunderforest Outdoors
|
||||||
|
'1065', // Hike & Bike Map
|
||||||
|
'1016', // 4UMaps,
|
||||||
|
'openmapsurfer'
|
||||||
|
],
|
||||||
|
'worldwide-monolingual': [
|
||||||
|
'osm-mapnik-german_style',
|
||||||
|
'osmfr',
|
||||||
|
'1017', // Osmapa.pl - Mapa OpenStreetMap Polska
|
||||||
|
'1023', // kosmosnimki.ru
|
||||||
|
'1021' // sputnik.ru
|
||||||
|
],
|
||||||
|
'europe': [
|
||||||
|
'MtbMap',
|
||||||
|
'1069' // MRI (maps.refuges.info)
|
||||||
|
],
|
||||||
|
'europe-monolingual': [
|
||||||
|
'osmfr-basque',
|
||||||
|
'osmfr-breton',
|
||||||
|
'osmfr-occitan'
|
||||||
|
],
|
||||||
|
'country': [
|
||||||
|
{
|
||||||
|
'BE': [
|
||||||
|
'osmbe',
|
||||||
|
'osmbe-fr',
|
||||||
|
'osmbe-nl',
|
||||||
|
]
|
||||||
|
},
|
||||||
|
'OpenStreetMap.CH',
|
||||||
|
'topplus-open',
|
||||||
|
'OpenStreetMap-turistautak',
|
||||||
|
{
|
||||||
|
'IL': [
|
||||||
|
'Israel_Hiking',
|
||||||
|
'Israel_MTB',
|
||||||
|
]
|
||||||
|
},
|
||||||
|
'mtbmap-no',
|
||||||
|
{
|
||||||
|
'SK': [
|
||||||
|
'Freemap.sk-Car',
|
||||||
|
'Freemap.sk-Hiking',
|
||||||
|
'Freemap.sk-Cyclo',
|
||||||
|
]
|
||||||
|
},
|
||||||
|
'osm-cambodia_laos_thailand_vietnam-bilingual'
|
||||||
|
]
|
||||||
|
},
|
||||||
|
'overlays': {
|
||||||
|
'worldwide': [
|
||||||
|
'HikeBike.HillShading',
|
||||||
|
'Waymarked_Trails-Cycling',
|
||||||
|
'Waymarked_Trails-Hiking',
|
||||||
|
'Waymarked_Trails-MTB',
|
||||||
|
'mapillary-coverage-raster'
|
||||||
|
],
|
||||||
|
'country': [
|
||||||
|
'historic-place-contours',
|
||||||
|
'hu-hillshade',
|
||||||
|
{
|
||||||
|
'PL': [
|
||||||
|
'mapaszlakow-cycle',
|
||||||
|
'mapaszlakow-bike',
|
||||||
|
'mapaszlakow-hike',
|
||||||
|
'mapaszlakow-mtb',
|
||||||
|
'mapaszlakow-incline'
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
};
|
||||||
Loading…
Add table
Add a link
Reference in a new issue