Add additional layers from own definitions

- in JOSM format with some exceptions
- basic WMS support
- API key handling
This commit is contained in:
Norbert Renner 2019-03-14 20:31:47 +01:00
parent bfa2ebb5a6
commit c2369acde0
16 changed files with 4548 additions and 54 deletions

View file

@ -23,6 +23,7 @@ var cleanCSS = require('gulp-clean-css');
var modifyCssUrls = require('gulp-modify-css-urls'); var modifyCssUrls = require('gulp-modify-css-urls');
var sort = require('gulp-sort'); var sort = require('gulp-sort');
var scanner = require('i18next-scanner'); var scanner = require('i18next-scanner');
var jsonConcat = require('gulp-json-concat');
var debug = false; var debug = false;
@ -272,3 +273,11 @@ gulp.task('i18next', function() {
})) }))
.pipe(gulp.dest('.')); .pipe(gulp.dest('.'));
}) })
gulp.task('layers', function () {
return gulp.src('layers/extra/**/*.json')
.pipe(jsonConcat('layers-extra.js', function(data){
return Buffer.from('Object.assign(BR.layerIndex, ' + JSON.stringify(data, null, 4) + ');');
}))
.pipe(gulp.dest('layers'));
});

View file

@ -361,6 +361,7 @@
<script src="keys.js"></script> <script src="keys.js"></script>
<script src="layers/layers-josm.js"></script> <script src="layers/layers-josm.js"></script>
<script src="layers/layers-collection.js"></script> <script src="layers/layers-collection.js"></script>
<script src="layers/layers-extra.js"></script>
<!-- "gulp inject" for debugging --> <!-- "gulp inject" for debugging -->
<!-- inject:js --> <!-- inject:js -->

View file

@ -9,41 +9,6 @@ BR.LayersTab = L.Control.Layers.extend({
this.addLeafletProvidersLayers(); this.addLeafletProvidersLayers();
var toJsTree = function(layerTree) {
var data = [];
function walkTree(inTree, outTree) {
if (Array.isArray(inTree)) {
for (var i = 0; i < inTree.length; i++) {
var layerId = inTree[i];
var childNode = {
'id': layerId,
'text': layerIndex[layerId].properties.name
};
outTree.push(childNode);
}
} else {
for (name in inTree) {
var value = inTree[name];
var children = [];
var rootNode = {
'text': name,
'state': {
'disabled': true
},
'children': children
};
outTree.push(rootNode);
walkTree(value, children);
}
}
}
walkTree(structure, data);
return data;
};
var structure = { var structure = {
'Base layers': { 'Base layers': {
'Worldwide international': [ 'Worldwide international': [
@ -55,7 +20,8 @@ BR.LayersTab = L.Control.Layers.extend({
'opencylemap', 'opencylemap',
"1061", // Thunderforest Outdoors "1061", // Thunderforest Outdoors
"1065", // Hike & Bike Map "1065", // Hike & Bike Map
"1016" // 4UMaps "1016", // 4UMaps,
"openmapsurfer"
], ],
'Worldwide monolingual': [ 'Worldwide monolingual': [
'osm-mapnik-german_style', 'osm-mapnik-german_style',
@ -70,6 +36,7 @@ BR.LayersTab = L.Control.Layers.extend({
"1069", // MRI (maps.refuges.info) "1069", // MRI (maps.refuges.info)
], ],
'Country': [ 'Country': [
'topplus-open',
'OpenStreetMap.CH', 'OpenStreetMap.CH',
'Freemap.sk-Car', 'Freemap.sk-Car',
'Freemap.sk-Hiking', 'Freemap.sk-Hiking',
@ -92,14 +59,25 @@ BR.LayersTab = L.Control.Layers.extend({
'HikeBike.HillShading', 'HikeBike.HillShading',
'Waymarked_Trails-Hiking', 'Waymarked_Trails-Hiking',
'Waymarked_Trails-Cycling', 'Waymarked_Trails-Cycling',
'Waymarked_Trails-MTB' 'Waymarked_Trails-MTB',
'mapillary-coverage-raster'
], ],
'Country': [ 'Country': [
'hu-hillshade' 'historic-place-contours',
'hu-hillshade',
{
'PL - Poland': [
'mapaszlakow-cycle',
'mapaszlakow-bike',
'mapaszlakow-hike',
'mapaszlakow-mtb',
'mapaszlakow-incline',
]
}
] ]
} }
}; };
var treeData = toJsTree(structure); var treeData = this.toJsTree(structure);
var onSelectNode = function (e, data) { var onSelectNode = function (e, data) {
var layerData = layerIndex[data.node.id]; var layerData = layerIndex[data.node.id];
@ -161,6 +139,57 @@ BR.LayersTab = L.Control.Layers.extend({
return this; return this;
}, },
toJsTree: function (layerTree) {
var data = [];
var self = this;
function walkTree(inTree, outTree) {
function walkObject(obj) {
for (name in obj) {
var value = obj[name];
var children = [];
var rootNode = {
'text': name,
'state': {
'disabled': true
},
'children': children
};
outTree.push(rootNode);
walkTree(value, children);
}
}
if (Array.isArray(inTree)) {
for (var i = 0; i < inTree.length; i++) {
var entry = inTree[i];
if (typeof entry === 'object') {
walkObject(entry);
} else {
var props = BR.layerIndex[entry].properties;
var url = props.url;
var keyName = self.getKeyName(url);
// when key required only add if configured
if (!keyName || keyName && BR.keys[keyName]) {
var childNode = {
'id': entry,
'text': props.name
};
outTree.push(childNode);
}
}
}
} else {
walkObject(inTree);
}
}
walkTree(layerTree, data);
return data;
},
addLeafletProvidersLayers: function () { addLeafletProvidersLayers: function () {
var includeList = [ var includeList = [
'Stamen.Terrain', 'Stamen.Terrain',
@ -186,6 +215,23 @@ BR.LayersTab = L.Control.Layers.extend({
BR.layerIndex['HikeBike.HillShading'].properties.overlay = true; BR.layerIndex['HikeBike.HillShading'].properties.overlay = true;
}, },
// own convention: key placeholder prefixed with 'key_'
// e.g. ?api_key={keys_openrouteservice}
getKeyName: function (url) {
var name = null;
var regex = /{keys_([^}]*)}/;
var found;
if (!url) return name;
found = url.match(regex);
if (found) {
name = found[1];
}
return name;
},
_getLayerObjByName: function (name) { _getLayerObjByName: function (name) {
for (var i = 0; i < this._layers.length; i++) { for (var i = 0; i < this._layers.length; i++) {
if (this._layers[i] && this._layers[i].name === name) { if (this._layers[i] && this._layers[i].name === name) {
@ -196,14 +242,16 @@ BR.LayersTab = L.Control.Layers.extend({
createLayer: function (layerData) { createLayer: function (layerData) {
var props = layerData.properties; var props = layerData.properties;
var url = props.url;
var layer; var layer;
// JOSM: https://{switch:a,b,c}.tile.openstreetmap.org/{zoom}/{x}/{y}.png // JOSM: https://{switch:a,b,c}.tile.openstreetmap.org/{zoom}/{x}/{y}.png
// Leaflet: https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png // Leaflet: https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png
function convertUrlJosm(url) { function convertUrlJosm(url) {
var regex = /{switch:[^}]*}/; var rxSwitch = /{switch:[^}]*}/;
var result = url.replace(regex, '{s}'); var rxZoom = /{zoom}/g;
result = result.replace('{zoom}', '{z}'); var result = url.replace(rxSwitch, '{s}');
result = result.replace(rxZoom, '{z}');
return result; return result;
} }
@ -219,28 +267,44 @@ BR.LayersTab = L.Control.Layers.extend({
return result; return result;
} }
var options = {
maxZoom: this._map.getMaxZoom(),
zIndex: this._lastZIndex + 1
};
var keyName = this.getKeyName(url);
if (keyName && BR.keys[keyName]) {
options['keys_' + keyName] = BR.keys[keyName];
}
if (props.dataSource === 'leaflet-providers') { if (props.dataSource === 'leaflet-providers') {
// leaflet-providers
layer = L.tileLayer.provider(props.id); layer = L.tileLayer.provider(props.id);
} else if (props.dataSource === 'LayersCollection') { } else if (props.dataSource === 'LayersCollection') {
layer = L.tileLayer(props.url, { layer = L.tileLayer(url, L.Util.extend(options, {
minZoom: props.minZoom,
maxNativeZoom: props.maxZoom, maxNativeZoom: props.maxZoom,
maxZoom: this._map.getMaxZoom(), }));
zIndex: this._lastZIndex + 1
});
if (props.subdomains) { if (props.subdomains) {
layer.subdomains = props.subdomains; layer.subdomains = props.subdomains;
} }
} else { } else {
// JOSM // JOSM
var url = convertUrlJosm(props.url); var url = convertUrlJosm(url);
layer = L.tileLayer(url, { var josmOptions = L.Util.extend(options, {
minZoom: props.min_zoom,
maxNativeZoom: props.max_zoom, maxNativeZoom: props.max_zoom,
maxZoom: this._map.getMaxZoom(), subdomains: getSubdomains(url),
subdomains: getSubdomains(props.url),
zIndex: this._lastZIndex + 1
}); });
if (props.type && props.type === 'wms') {
layer = L.tileLayer.wms(url, L.Util.extend(josmOptions, {
layers: props.layers,
format: props.format
}));
} else {
layer = L.tileLayer(url, josmOptions);
}
} }
return layer return layer

View file

@ -13,7 +13,10 @@
thunderforest: '', thunderforest: '',
// Strava API token in case you want to display Strava segments // Strava API token in case you want to display Strava segments
strava: '' strava: '',
// OpenMapSurfer (OpenRouteService API), https://openrouteservice.org/plans/
openrouteservice: ''
}; };
})(); })();

View file

@ -0,0 +1,45 @@
{
"geometry": {
"coordinates": [
[
[
5.45,
45
],
[
17,
45
],
[
17,
56.27
],
[
5.45,
56.27
],
[
5.45,
45
]
]
],
"type": "Polygon"
},
"properties": {
"attribution": {
"required": true,
"html": "<a href=\"https://www.eea.europa.eu/data-and-maps/data/eu-dem\" target=\"_blank\" rel=\"noopener\">Produced using Copernicus data and information funded by the European Union - EU-DEM layers</a>, download from <a href=\"http://opendem.info/index.html\" target=\"_blank\">OpenDEM</a>, Data sources <a href=\"https://www2.jpl.nasa.gov/srtm/\" target=\"_blank\">SRTM</a>, <a href=\"https://asterweb.jpl.nasa.gov/gdem.asp\" target=\"_blank\">ASTER GDEM</a>, Tiles from <a href=\"http://www.historic.place/\" target=\"_blank\" rel=\"noopener\">Historic.Place</a>"
},
"country_code": "DACH",
"id": "historic-place-contours",
"min_zoom": 12,
"max_zoom": 15,
"name": "Contours DACH",
"overlay": true,
"type": "tms",
"url": "http://tiles.historic.place/ele/de/{zoom}/{x}/{y}.png",
"valid-georeference": true
},
"type": "Feature"
}

View file

@ -0,0 +1,412 @@
{
"geometry": {
"coordinates": [
[
[
15.9751041,
54.3709213
],
[
16.311164,
54.5561775
],
[
17.1391878,
54.7845723
],
[
18.3448458,
54.9022727
],
[
19.6613689,
54.4737213
],
[
20.2815206,
54.4213456
],
[
21.4663914,
54.3406369
],
[
22.7759855,
54.3769755
],
[
22.8625989,
54.4233613
],
[
23.2956657,
54.2678633
],
[
23.5347186,
54.0955258
],
[
23.5208604,
53.9775182
],
[
23.7183389,
53.4629603
],
[
23.9296755,
53.1856735
],
[
23.9296755,
52.6887269
],
[
23.732197,
52.6067497
],
[
23.5658994,
52.5878101
],
[
23.2090523,
52.3302642
],
[
23.1951942,
52.2370089
],
[
23.5035377,
52.1860596
],
[
23.6906226,
52.0030113
],
[
23.5970802,
51.739903
],
[
23.6629063,
51.3888562
],
[
23.9366046,
50.9827781
],
[
24.1687284,
50.8604752
],
[
24.0197534,
50.8035823
],
[
24.1098313,
50.6610467
],
[
24.0578633,
50.4188439
],
[
23.6178674,
50.3083403
],
[
22.6824431,
49.5163532
],
[
22.7378756,
49.2094935
],
[
22.9041733,
49.0780441
],
[
22.8625989,
48.9940062
],
[
22.6096878,
49.0371785
],
[
22.0761495,
49.2004392
],
[
21.8474902,
49.3721872
],
[
21.3763135,
49.4488281
],
[
21.1026153,
49.3721872
],
[
20.9120659,
49.3022043
],
[
20.6452967,
49.3902311
],
[
20.1845136,
49.3315641
],
[
20.1186875,
49.2004392
],
[
19.9419962,
49.1302123
],
[
19.765305,
49.2117568
],
[
19.7479823,
49.3992506
],
[
19.6024718,
49.4150307
],
[
19.5089294,
49.5815389
],
[
19.4292451,
49.5905232
],
[
19.2317666,
49.4150307
],
[
18.9961783,
49.387976
],
[
18.9338167,
49.4916048
],
[
18.8368097,
49.4938552
],
[
18.8021643,
49.6623381
],
[
18.6427958,
49.7094091
],
[
18.521537,
49.8994693
],
[
18.0815412,
50.0109209
],
[
17.8875272,
49.9886512
],
[
17.7385522,
50.0687739
],
[
17.6068999,
50.1709584
],
[
17.7454813,
50.2153184
],
[
17.710836,
50.3017019
],
[
17.4163505,
50.2640668
],
[
16.9486384,
50.4453265
],
[
16.8932058,
50.4033889
],
[
17.0006064,
50.3105529
],
[
17.017929,
50.2241854
],
[
16.8135215,
50.186489
],
[
16.6402948,
50.0976742
],
[
16.4324227,
50.2862087
],
[
16.1968344,
50.4276731
],
[
16.4220291,
50.5885165
],
[
16.3388803,
50.6632429
],
[
16.2280152,
50.6368824
],
[
16.0547884,
50.6127057
],
[
15.5732181,
50.7641544
],
[
15.2683391,
50.8976368
],
[
15.2440873,
50.980597
],
[
15.0292862,
51.0133036
],
[
15.0015699,
50.8582883
],
[
14.8110205,
50.8735944
],
[
14.956531,
51.0721176
],
[
15.0188926,
51.2914636
],
[
14.9392083,
51.4601459
],
[
14.7209426,
51.5571799
],
[
14.7521234,
51.6260562
],
[
14.5996839,
51.8427626
],
[
14.70362,
52.0733396
],
[
14.5581095,
52.2497371
],
[
14.5165351,
52.425436
],
[
14.6031485,
52.5878101
],
[
14.1146491,
52.8208272
],
[
14.152759,
52.9733951
],
[
14.3502374,
53.0734212
],
[
14.4229927,
53.2665624
],
[
14.1977979,
53.8734759
],
[
14.2220497,
53.9958517
],
[
15.9751041,
54.3709213
]
]
],
"type": "Polygon"
},
"properties": {
"attribution": {
"text": "Tiles © OSM Mapa Szlaków",
"url": "http://mapaszlakow.eu/"
},
"country_code": "PL",
"id": "mapaszlakow-bike",
"max_zoom": 16,
"min_zoom": 6,
"name": "Bicycle (Mapa Szlaków)",
"overlay": true,
"type": "tms",
"url": "http://mapaszlakow.eu/b{zoom}/{zoom}/{x}/{y}.png"
},
"type": "Feature"
}

View file

@ -0,0 +1,412 @@
{
"geometry": {
"coordinates": [
[
[
15.9751041,
54.3709213
],
[
16.311164,
54.5561775
],
[
17.1391878,
54.7845723
],
[
18.3448458,
54.9022727
],
[
19.6613689,
54.4737213
],
[
20.2815206,
54.4213456
],
[
21.4663914,
54.3406369
],
[
22.7759855,
54.3769755
],
[
22.8625989,
54.4233613
],
[
23.2956657,
54.2678633
],
[
23.5347186,
54.0955258
],
[
23.5208604,
53.9775182
],
[
23.7183389,
53.4629603
],
[
23.9296755,
53.1856735
],
[
23.9296755,
52.6887269
],
[
23.732197,
52.6067497
],
[
23.5658994,
52.5878101
],
[
23.2090523,
52.3302642
],
[
23.1951942,
52.2370089
],
[
23.5035377,
52.1860596
],
[
23.6906226,
52.0030113
],
[
23.5970802,
51.739903
],
[
23.6629063,
51.3888562
],
[
23.9366046,
50.9827781
],
[
24.1687284,
50.8604752
],
[
24.0197534,
50.8035823
],
[
24.1098313,
50.6610467
],
[
24.0578633,
50.4188439
],
[
23.6178674,
50.3083403
],
[
22.6824431,
49.5163532
],
[
22.7378756,
49.2094935
],
[
22.9041733,
49.0780441
],
[
22.8625989,
48.9940062
],
[
22.6096878,
49.0371785
],
[
22.0761495,
49.2004392
],
[
21.8474902,
49.3721872
],
[
21.3763135,
49.4488281
],
[
21.1026153,
49.3721872
],
[
20.9120659,
49.3022043
],
[
20.6452967,
49.3902311
],
[
20.1845136,
49.3315641
],
[
20.1186875,
49.2004392
],
[
19.9419962,
49.1302123
],
[
19.765305,
49.2117568
],
[
19.7479823,
49.3992506
],
[
19.6024718,
49.4150307
],
[
19.5089294,
49.5815389
],
[
19.4292451,
49.5905232
],
[
19.2317666,
49.4150307
],
[
18.9961783,
49.387976
],
[
18.9338167,
49.4916048
],
[
18.8368097,
49.4938552
],
[
18.8021643,
49.6623381
],
[
18.6427958,
49.7094091
],
[
18.521537,
49.8994693
],
[
18.0815412,
50.0109209
],
[
17.8875272,
49.9886512
],
[
17.7385522,
50.0687739
],
[
17.6068999,
50.1709584
],
[
17.7454813,
50.2153184
],
[
17.710836,
50.3017019
],
[
17.4163505,
50.2640668
],
[
16.9486384,
50.4453265
],
[
16.8932058,
50.4033889
],
[
17.0006064,
50.3105529
],
[
17.017929,
50.2241854
],
[
16.8135215,
50.186489
],
[
16.6402948,
50.0976742
],
[
16.4324227,
50.2862087
],
[
16.1968344,
50.4276731
],
[
16.4220291,
50.5885165
],
[
16.3388803,
50.6632429
],
[
16.2280152,
50.6368824
],
[
16.0547884,
50.6127057
],
[
15.5732181,
50.7641544
],
[
15.2683391,
50.8976368
],
[
15.2440873,
50.980597
],
[
15.0292862,
51.0133036
],
[
15.0015699,
50.8582883
],
[
14.8110205,
50.8735944
],
[
14.956531,
51.0721176
],
[
15.0188926,
51.2914636
],
[
14.9392083,
51.4601459
],
[
14.7209426,
51.5571799
],
[
14.7521234,
51.6260562
],
[
14.5996839,
51.8427626
],
[
14.70362,
52.0733396
],
[
14.5581095,
52.2497371
],
[
14.5165351,
52.425436
],
[
14.6031485,
52.5878101
],
[
14.1146491,
52.8208272
],
[
14.152759,
52.9733951
],
[
14.3502374,
53.0734212
],
[
14.4229927,
53.2665624
],
[
14.1977979,
53.8734759
],
[
14.2220497,
53.9958517
],
[
15.9751041,
54.3709213
]
]
],
"type": "Polygon"
},
"properties": {
"attribution": {
"text": "Tiles © OSM Mapa Szlaków",
"url": "http://mapaszlakow.eu/"
},
"country_code": "PL",
"id": "mapaszlakow-cycle",
"max_zoom": 16,
"min_zoom": 6,
"name": "Cycleways (Mapa Szlaków)",
"overlay": true,
"type": "tms",
"url": "http://mapaszlakow.eu/c{zoom}/{zoom}/{x}/{y}.png"
},
"type": "Feature"
}

View file

@ -0,0 +1,412 @@
{
"geometry": {
"coordinates": [
[
[
15.9751041,
54.3709213
],
[
16.311164,
54.5561775
],
[
17.1391878,
54.7845723
],
[
18.3448458,
54.9022727
],
[
19.6613689,
54.4737213
],
[
20.2815206,
54.4213456
],
[
21.4663914,
54.3406369
],
[
22.7759855,
54.3769755
],
[
22.8625989,
54.4233613
],
[
23.2956657,
54.2678633
],
[
23.5347186,
54.0955258
],
[
23.5208604,
53.9775182
],
[
23.7183389,
53.4629603
],
[
23.9296755,
53.1856735
],
[
23.9296755,
52.6887269
],
[
23.732197,
52.6067497
],
[
23.5658994,
52.5878101
],
[
23.2090523,
52.3302642
],
[
23.1951942,
52.2370089
],
[
23.5035377,
52.1860596
],
[
23.6906226,
52.0030113
],
[
23.5970802,
51.739903
],
[
23.6629063,
51.3888562
],
[
23.9366046,
50.9827781
],
[
24.1687284,
50.8604752
],
[
24.0197534,
50.8035823
],
[
24.1098313,
50.6610467
],
[
24.0578633,
50.4188439
],
[
23.6178674,
50.3083403
],
[
22.6824431,
49.5163532
],
[
22.7378756,
49.2094935
],
[
22.9041733,
49.0780441
],
[
22.8625989,
48.9940062
],
[
22.6096878,
49.0371785
],
[
22.0761495,
49.2004392
],
[
21.8474902,
49.3721872
],
[
21.3763135,
49.4488281
],
[
21.1026153,
49.3721872
],
[
20.9120659,
49.3022043
],
[
20.6452967,
49.3902311
],
[
20.1845136,
49.3315641
],
[
20.1186875,
49.2004392
],
[
19.9419962,
49.1302123
],
[
19.765305,
49.2117568
],
[
19.7479823,
49.3992506
],
[
19.6024718,
49.4150307
],
[
19.5089294,
49.5815389
],
[
19.4292451,
49.5905232
],
[
19.2317666,
49.4150307
],
[
18.9961783,
49.387976
],
[
18.9338167,
49.4916048
],
[
18.8368097,
49.4938552
],
[
18.8021643,
49.6623381
],
[
18.6427958,
49.7094091
],
[
18.521537,
49.8994693
],
[
18.0815412,
50.0109209
],
[
17.8875272,
49.9886512
],
[
17.7385522,
50.0687739
],
[
17.6068999,
50.1709584
],
[
17.7454813,
50.2153184
],
[
17.710836,
50.3017019
],
[
17.4163505,
50.2640668
],
[
16.9486384,
50.4453265
],
[
16.8932058,
50.4033889
],
[
17.0006064,
50.3105529
],
[
17.017929,
50.2241854
],
[
16.8135215,
50.186489
],
[
16.6402948,
50.0976742
],
[
16.4324227,
50.2862087
],
[
16.1968344,
50.4276731
],
[
16.4220291,
50.5885165
],
[
16.3388803,
50.6632429
],
[
16.2280152,
50.6368824
],
[
16.0547884,
50.6127057
],
[
15.5732181,
50.7641544
],
[
15.2683391,
50.8976368
],
[
15.2440873,
50.980597
],
[
15.0292862,
51.0133036
],
[
15.0015699,
50.8582883
],
[
14.8110205,
50.8735944
],
[
14.956531,
51.0721176
],
[
15.0188926,
51.2914636
],
[
14.9392083,
51.4601459
],
[
14.7209426,
51.5571799
],
[
14.7521234,
51.6260562
],
[
14.5996839,
51.8427626
],
[
14.70362,
52.0733396
],
[
14.5581095,
52.2497371
],
[
14.5165351,
52.425436
],
[
14.6031485,
52.5878101
],
[
14.1146491,
52.8208272
],
[
14.152759,
52.9733951
],
[
14.3502374,
53.0734212
],
[
14.4229927,
53.2665624
],
[
14.1977979,
53.8734759
],
[
14.2220497,
53.9958517
],
[
15.9751041,
54.3709213
]
]
],
"type": "Polygon"
},
"properties": {
"attribution": {
"text": "Tiles © OSM Mapa Szlaków",
"url": "http://mapaszlakow.eu/"
},
"country_code": "PL",
"id": "mapaszlakow-hike",
"max_zoom": 16,
"min_zoom": 6,
"name": "Hiking (Mapa Szlaków)",
"overlay": true,
"type": "tms",
"url": "http://mapaszlakow.eu/h{zoom}/{zoom}/{x}/{y}.png"
},
"type": "Feature"
}

View file

@ -0,0 +1,412 @@
{
"geometry": {
"coordinates": [
[
[
15.9751041,
54.3709213
],
[
16.311164,
54.5561775
],
[
17.1391878,
54.7845723
],
[
18.3448458,
54.9022727
],
[
19.6613689,
54.4737213
],
[
20.2815206,
54.4213456
],
[
21.4663914,
54.3406369
],
[
22.7759855,
54.3769755
],
[
22.8625989,
54.4233613
],
[
23.2956657,
54.2678633
],
[
23.5347186,
54.0955258
],
[
23.5208604,
53.9775182
],
[
23.7183389,
53.4629603
],
[
23.9296755,
53.1856735
],
[
23.9296755,
52.6887269
],
[
23.732197,
52.6067497
],
[
23.5658994,
52.5878101
],
[
23.2090523,
52.3302642
],
[
23.1951942,
52.2370089
],
[
23.5035377,
52.1860596
],
[
23.6906226,
52.0030113
],
[
23.5970802,
51.739903
],
[
23.6629063,
51.3888562
],
[
23.9366046,
50.9827781
],
[
24.1687284,
50.8604752
],
[
24.0197534,
50.8035823
],
[
24.1098313,
50.6610467
],
[
24.0578633,
50.4188439
],
[
23.6178674,
50.3083403
],
[
22.6824431,
49.5163532
],
[
22.7378756,
49.2094935
],
[
22.9041733,
49.0780441
],
[
22.8625989,
48.9940062
],
[
22.6096878,
49.0371785
],
[
22.0761495,
49.2004392
],
[
21.8474902,
49.3721872
],
[
21.3763135,
49.4488281
],
[
21.1026153,
49.3721872
],
[
20.9120659,
49.3022043
],
[
20.6452967,
49.3902311
],
[
20.1845136,
49.3315641
],
[
20.1186875,
49.2004392
],
[
19.9419962,
49.1302123
],
[
19.765305,
49.2117568
],
[
19.7479823,
49.3992506
],
[
19.6024718,
49.4150307
],
[
19.5089294,
49.5815389
],
[
19.4292451,
49.5905232
],
[
19.2317666,
49.4150307
],
[
18.9961783,
49.387976
],
[
18.9338167,
49.4916048
],
[
18.8368097,
49.4938552
],
[
18.8021643,
49.6623381
],
[
18.6427958,
49.7094091
],
[
18.521537,
49.8994693
],
[
18.0815412,
50.0109209
],
[
17.8875272,
49.9886512
],
[
17.7385522,
50.0687739
],
[
17.6068999,
50.1709584
],
[
17.7454813,
50.2153184
],
[
17.710836,
50.3017019
],
[
17.4163505,
50.2640668
],
[
16.9486384,
50.4453265
],
[
16.8932058,
50.4033889
],
[
17.0006064,
50.3105529
],
[
17.017929,
50.2241854
],
[
16.8135215,
50.186489
],
[
16.6402948,
50.0976742
],
[
16.4324227,
50.2862087
],
[
16.1968344,
50.4276731
],
[
16.4220291,
50.5885165
],
[
16.3388803,
50.6632429
],
[
16.2280152,
50.6368824
],
[
16.0547884,
50.6127057
],
[
15.5732181,
50.7641544
],
[
15.2683391,
50.8976368
],
[
15.2440873,
50.980597
],
[
15.0292862,
51.0133036
],
[
15.0015699,
50.8582883
],
[
14.8110205,
50.8735944
],
[
14.956531,
51.0721176
],
[
15.0188926,
51.2914636
],
[
14.9392083,
51.4601459
],
[
14.7209426,
51.5571799
],
[
14.7521234,
51.6260562
],
[
14.5996839,
51.8427626
],
[
14.70362,
52.0733396
],
[
14.5581095,
52.2497371
],
[
14.5165351,
52.425436
],
[
14.6031485,
52.5878101
],
[
14.1146491,
52.8208272
],
[
14.152759,
52.9733951
],
[
14.3502374,
53.0734212
],
[
14.4229927,
53.2665624
],
[
14.1977979,
53.8734759
],
[
14.2220497,
53.9958517
],
[
15.9751041,
54.3709213
]
]
],
"type": "Polygon"
},
"properties": {
"attribution": {
"text": "Tiles © OSM Mapa Szlaków",
"url": "http://mapaszlakow.eu/"
},
"country_code": "PL",
"id": "mapaszlakow-incline",
"max_zoom": 16,
"min_zoom": 14,
"name": "Incline (Mapa Szlaków)",
"overlay": true,
"type": "tms",
"url": "http://mapaszlakow.eu/incline{zoom}/{zoom}/{x}/{y}.png"
},
"type": "Feature"
}

View file

@ -0,0 +1,412 @@
{
"geometry": {
"coordinates": [
[
[
15.9751041,
54.3709213
],
[
16.311164,
54.5561775
],
[
17.1391878,
54.7845723
],
[
18.3448458,
54.9022727
],
[
19.6613689,
54.4737213
],
[
20.2815206,
54.4213456
],
[
21.4663914,
54.3406369
],
[
22.7759855,
54.3769755
],
[
22.8625989,
54.4233613
],
[
23.2956657,
54.2678633
],
[
23.5347186,
54.0955258
],
[
23.5208604,
53.9775182
],
[
23.7183389,
53.4629603
],
[
23.9296755,
53.1856735
],
[
23.9296755,
52.6887269
],
[
23.732197,
52.6067497
],
[
23.5658994,
52.5878101
],
[
23.2090523,
52.3302642
],
[
23.1951942,
52.2370089
],
[
23.5035377,
52.1860596
],
[
23.6906226,
52.0030113
],
[
23.5970802,
51.739903
],
[
23.6629063,
51.3888562
],
[
23.9366046,
50.9827781
],
[
24.1687284,
50.8604752
],
[
24.0197534,
50.8035823
],
[
24.1098313,
50.6610467
],
[
24.0578633,
50.4188439
],
[
23.6178674,
50.3083403
],
[
22.6824431,
49.5163532
],
[
22.7378756,
49.2094935
],
[
22.9041733,
49.0780441
],
[
22.8625989,
48.9940062
],
[
22.6096878,
49.0371785
],
[
22.0761495,
49.2004392
],
[
21.8474902,
49.3721872
],
[
21.3763135,
49.4488281
],
[
21.1026153,
49.3721872
],
[
20.9120659,
49.3022043
],
[
20.6452967,
49.3902311
],
[
20.1845136,
49.3315641
],
[
20.1186875,
49.2004392
],
[
19.9419962,
49.1302123
],
[
19.765305,
49.2117568
],
[
19.7479823,
49.3992506
],
[
19.6024718,
49.4150307
],
[
19.5089294,
49.5815389
],
[
19.4292451,
49.5905232
],
[
19.2317666,
49.4150307
],
[
18.9961783,
49.387976
],
[
18.9338167,
49.4916048
],
[
18.8368097,
49.4938552
],
[
18.8021643,
49.6623381
],
[
18.6427958,
49.7094091
],
[
18.521537,
49.8994693
],
[
18.0815412,
50.0109209
],
[
17.8875272,
49.9886512
],
[
17.7385522,
50.0687739
],
[
17.6068999,
50.1709584
],
[
17.7454813,
50.2153184
],
[
17.710836,
50.3017019
],
[
17.4163505,
50.2640668
],
[
16.9486384,
50.4453265
],
[
16.8932058,
50.4033889
],
[
17.0006064,
50.3105529
],
[
17.017929,
50.2241854
],
[
16.8135215,
50.186489
],
[
16.6402948,
50.0976742
],
[
16.4324227,
50.2862087
],
[
16.1968344,
50.4276731
],
[
16.4220291,
50.5885165
],
[
16.3388803,
50.6632429
],
[
16.2280152,
50.6368824
],
[
16.0547884,
50.6127057
],
[
15.5732181,
50.7641544
],
[
15.2683391,
50.8976368
],
[
15.2440873,
50.980597
],
[
15.0292862,
51.0133036
],
[
15.0015699,
50.8582883
],
[
14.8110205,
50.8735944
],
[
14.956531,
51.0721176
],
[
15.0188926,
51.2914636
],
[
14.9392083,
51.4601459
],
[
14.7209426,
51.5571799
],
[
14.7521234,
51.6260562
],
[
14.5996839,
51.8427626
],
[
14.70362,
52.0733396
],
[
14.5581095,
52.2497371
],
[
14.5165351,
52.425436
],
[
14.6031485,
52.5878101
],
[
14.1146491,
52.8208272
],
[
14.152759,
52.9733951
],
[
14.3502374,
53.0734212
],
[
14.4229927,
53.2665624
],
[
14.1977979,
53.8734759
],
[
14.2220497,
53.9958517
],
[
15.9751041,
54.3709213
]
]
],
"type": "Polygon"
},
"properties": {
"attribution": {
"text": "Tiles © OSM Mapa Szlaków",
"url": "http://mapaszlakow.eu/"
},
"country_code": "PL",
"id": "mapaszlakow-mtb",
"max_zoom": 16,
"min_zoom": 13,
"name": "MTB:scale (Mapa Szlaków)",
"overlay": true,
"type": "tms",
"url": "http://mapaszlakow.eu/mtb{zoom}/{zoom}/{x}/{y}.png"
},
"type": "Feature"
}

View file

@ -0,0 +1,17 @@
{
"geometry": null,
"properties": {
"attribution": {
"text": "Mapillary, CC BY",
"url": "https://www.mapillary.com"
},
"id": "mapillary-coverage-raster",
"max_zoom": 17,
"name": "Mapillary Coverage",
"overlay": true,
"type": "tms",
"url": "https://d6a1v2w10ny40.cloudfront.net/v0.1/{z}/{x}/{y}.png"
},
"type": "Feature"
}

View file

@ -0,0 +1,15 @@
{
"geometry": null,
"properties": {
"attribution": {
"html": "<a href=\"https://giscience.uni-hd.de\" target=\"_blank\" rel=\"noopener\">GIScience Research Group</a> @ University of Heidelberg (<a href=\"https://openrouteservice.org/\" target=\"_blank\" rel=\"noopener\">info</a>)"
},
"id": "openmapsurfer",
"max_zoom": 19,
"name": "OpenMapSurfer",
"type": "tms",
"url": "https://api.openrouteservice.org/mapsurfer/{zoom}/{x}/{y}.png?api_key={keys_openrouteservice}"
},
"type": "Feature"
}

View file

@ -0,0 +1,42 @@
{
"geometry": {
"coordinates": [
[
[
4.219,
46.317
],
[
16.875,
46.317
],
[
16.875,
55.776
],
[
4.219,
55.776
],
[
4.219,
46.317
]
]
],
"type": "Polygon"
},
"properties": {
"attribution": {
"html": "© <a href=\"http://www.bkg.bund.de\" target=\"_blank\" rel=\"noopener\">Bundesamt für Kartographie und Geodäsie</a> 2018, <a href=\"http://sg.geodatenzentrum.de/web_public/Datenquellen_TopPlus_Open.pdf\" target=\"_blank\" rel=\"noopener\">Datenquellen</a>"
},
"id": "topplus-open",
"name": "TopPlusOpen",
"type": "wms",
"url": "http://sgx.geodatenzentrum.de/wms_topplus_web_open",
"layers": "web",
"format": "image/png"
},
"type": "Feature"
}

2178
layers/layers-extra.js Normal file

File diff suppressed because it is too large Load diff

View file

@ -64,6 +64,7 @@
"gulp-github-release": "^1.2.1", "gulp-github-release": "^1.2.1",
"gulp-if": "^2.0.0", "gulp-if": "^2.0.0",
"gulp-inject": "^1.2.0", "gulp-inject": "^1.2.0",
"gulp-json-concat": "^0.1.1",
"gulp-modify-css-urls": "^2.0.0", "gulp-modify-css-urls": "^2.0.0",
"gulp-postcss": "^7.0.1", "gulp-postcss": "^7.0.1",
"gulp-remember": "^0.3.0", "gulp-remember": "^0.3.0",

View file

@ -1194,6 +1194,11 @@
"@turf/invariant" "^5.1.5" "@turf/invariant" "^5.1.5"
d3-voronoi "1.1.2" d3-voronoi "1.1.2"
JSV@^4.0.x:
version "4.0.2"
resolved "https://registry.yarnpkg.com/JSV/-/JSV-4.0.2.tgz#d077f6825571f82132f9dffaed587b4029feff57"
integrity sha1-0Hf2glVx+CEy+d/67Vh7QCn+/1c=
acorn-bigint@^0.3.1: acorn-bigint@^0.3.1:
version "0.3.1" version "0.3.1"
resolved "https://registry.yarnpkg.com/acorn-bigint/-/acorn-bigint-0.3.1.tgz#edb40a414dcaf5a09c2933db6bed79454b3ff46a" resolved "https://registry.yarnpkg.com/acorn-bigint/-/acorn-bigint-0.3.1.tgz#edb40a414dcaf5a09c2933db6bed79454b3ff46a"
@ -1331,6 +1336,11 @@ ansi-styles@^3.2.1:
dependencies: dependencies:
color-convert "^1.9.0" color-convert "^1.9.0"
ansi-styles@~1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-1.0.0.tgz#cb102df1c56f5123eab8b67cd7b98027a0279178"
integrity sha1-yxAt8cVvUSPquLZ817mAJ6AnkXg=
ansi-wrap@0.1.0, ansi-wrap@^0.1.0: ansi-wrap@0.1.0, ansi-wrap@^0.1.0:
version "0.1.0" version "0.1.0"
resolved "https://registry.yarnpkg.com/ansi-wrap/-/ansi-wrap-0.1.0.tgz#a82250ddb0015e9a27ca82e82ea603bbfa45efaf" resolved "https://registry.yarnpkg.com/ansi-wrap/-/ansi-wrap-0.1.0.tgz#a82250ddb0015e9a27ca82e82ea603bbfa45efaf"
@ -1683,6 +1693,15 @@ chalk@^2.4.1:
escape-string-regexp "^1.0.5" escape-string-regexp "^1.0.5"
supports-color "^5.3.0" supports-color "^5.3.0"
chalk@~0.4.0:
version "0.4.0"
resolved "https://registry.yarnpkg.com/chalk/-/chalk-0.4.0.tgz#5199a3ddcd0c1efe23bc08c1b027b06176e0c64f"
integrity sha1-UZmj3c0MHv4jvAjBsCewYXbgxk8=
dependencies:
ansi-styles "~1.0.0"
has-color "~0.1.0"
strip-ansi "~0.1.0"
class-utils@^0.3.5: class-utils@^0.3.5:
version "0.3.6" version "0.3.6"
resolved "https://registry.yarnpkg.com/class-utils/-/class-utils-0.3.6.tgz#f93369ae8b9a7ce02fd41faad0ca83033190c463" resolved "https://registry.yarnpkg.com/class-utils/-/class-utils-0.3.6.tgz#f93369ae8b9a7ce02fd41faad0ca83033190c463"
@ -2727,6 +2746,15 @@ gulp-inject@^1.2.0:
event-stream "^3.1.0" event-stream "^3.1.0"
gulp-util "^3.0.0" gulp-util "^3.0.0"
gulp-json-concat@^0.1.1:
version "0.1.1"
resolved "https://registry.yarnpkg.com/gulp-json-concat/-/gulp-json-concat-0.1.1.tgz#b66cda73fbb8cfc3d23de601a3e72fc52432ec5d"
integrity sha512-6E9HBFUIvdFYrqmO8j2+e0DcJ2uuY7qxQcrxZ4eFNvhYy+M34+vKjv272OuA7NSnt0G2EPITBazmjv8hszJpgQ==
dependencies:
gulp-util "^3.0.8"
jsonlint "^1.6.2"
through "^2.3.8"
gulp-match@^1.0.3: gulp-match@^1.0.3:
version "1.0.3" version "1.0.3"
resolved "https://registry.yarnpkg.com/gulp-match/-/gulp-match-1.0.3.tgz#91c7c0d7f29becd6606d57d80a7f8776a87aba8e" resolved "https://registry.yarnpkg.com/gulp-match/-/gulp-match-1.0.3.tgz#91c7c0d7f29becd6606d57d80a7f8776a87aba8e"
@ -2818,7 +2846,7 @@ gulp-uglify@^1.1.0:
uglify-save-license "^0.4.1" uglify-save-license "^0.4.1"
vinyl-sourcemaps-apply "^0.2.0" vinyl-sourcemaps-apply "^0.2.0"
gulp-util@^3.0.0, gulp-util@^3.0.1, gulp-util@^3.0.7: gulp-util@^3.0.0, gulp-util@^3.0.1, gulp-util@^3.0.7, gulp-util@^3.0.8:
version "3.0.8" version "3.0.8"
resolved "https://registry.yarnpkg.com/gulp-util/-/gulp-util-3.0.8.tgz#0054e1e744502e27c04c187c3ecc505dd54bbb4f" resolved "https://registry.yarnpkg.com/gulp-util/-/gulp-util-3.0.8.tgz#0054e1e744502e27c04c187c3ecc505dd54bbb4f"
integrity sha1-AFTh50RQLifATBh8PsxQXdVLu08= integrity sha1-AFTh50RQLifATBh8PsxQXdVLu08=
@ -2899,6 +2927,11 @@ has-ansi@^2.0.0:
dependencies: dependencies:
ansi-regex "^2.0.0" ansi-regex "^2.0.0"
has-color@~0.1.0:
version "0.1.7"
resolved "https://registry.yarnpkg.com/has-color/-/has-color-0.1.7.tgz#67144a5260c34fc3cca677d041daf52fe7b78b2f"
integrity sha1-ZxRKUmDDT8PMpnfQQdr1L+e3iy8=
has-flag@^3.0.0: has-flag@^3.0.0:
version "3.0.0" version "3.0.0"
resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd"
@ -3352,6 +3385,14 @@ json-stringify-safe@~5.0.1:
resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb"
integrity sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus= integrity sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=
jsonlint@^1.6.2:
version "1.6.3"
resolved "https://registry.yarnpkg.com/jsonlint/-/jsonlint-1.6.3.tgz#cb5e31efc0b78291d0d862fbef05900adf212988"
integrity sha512-jMVTMzP+7gU/IyC6hvKyWpUU8tmTkK5b3BPNuMI9U8Sit+YAWLlZwB6Y6YrdCxfg2kNz05p3XY3Bmm4m26Nv3A==
dependencies:
JSV "^4.0.x"
nomnom "^1.5.x"
jsprim@^1.2.2: jsprim@^1.2.2:
version "1.4.1" version "1.4.1"
resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.1.tgz#313e66bc1e5cc06e438bc1b7499c2e5c56acb6a2" resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.1.tgz#313e66bc1e5cc06e438bc1b7499c2e5c56acb6a2"
@ -3868,6 +3909,14 @@ natives@^1.1.0:
resolved "https://registry.yarnpkg.com/natives/-/natives-1.1.6.tgz#a603b4a498ab77173612b9ea1acdec4d980f00bb" resolved "https://registry.yarnpkg.com/natives/-/natives-1.1.6.tgz#a603b4a498ab77173612b9ea1acdec4d980f00bb"
integrity sha512-6+TDFewD4yxY14ptjKaS63GVdtKiES1pTPyxn9Jb0rBqPMZ7VcCiooEhPNsr+mqHtMGxa/5c/HhcC4uPEUw/nA== integrity sha512-6+TDFewD4yxY14ptjKaS63GVdtKiES1pTPyxn9Jb0rBqPMZ7VcCiooEhPNsr+mqHtMGxa/5c/HhcC4uPEUw/nA==
nomnom@^1.5.x:
version "1.8.1"
resolved "https://registry.yarnpkg.com/nomnom/-/nomnom-1.8.1.tgz#2151f722472ba79e50a76fc125bb8c8f2e4dc2a7"
integrity sha1-IVH3Ikcrp55Qp2/BJbuMjy5Nwqc=
dependencies:
chalk "~0.4.0"
underscore "~1.6.0"
normalize-package-data@^2.3.2, normalize-package-data@^2.3.4: normalize-package-data@^2.3.2, normalize-package-data@^2.3.4:
version "2.5.0" version "2.5.0"
resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.5.0.tgz#e66db1838b200c1dfc233225d12cb36520e234a8" resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.5.0.tgz#e66db1838b200c1dfc233225d12cb36520e234a8"
@ -4939,6 +4988,11 @@ strip-ansi@^3.0.0:
dependencies: dependencies:
ansi-regex "^2.0.0" ansi-regex "^2.0.0"
strip-ansi@~0.1.0:
version "0.1.1"
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-0.1.1.tgz#39e8a98d044d150660abe4a6808acf70bb7bc991"
integrity sha1-OeipjQRNFQZgq+SmgIrPcLt7yZE=
strip-bom-buf@^1.0.0: strip-bom-buf@^1.0.0:
version "1.0.0" version "1.0.0"
resolved "https://registry.yarnpkg.com/strip-bom-buf/-/strip-bom-buf-1.0.0.tgz#1cb45aaf57530f4caf86c7f75179d2c9a51dd572" resolved "https://registry.yarnpkg.com/strip-bom-buf/-/strip-bom-buf-1.0.0.tgz#1cb45aaf57530f4caf86c7f75179d2c9a51dd572"
@ -5197,6 +5251,11 @@ unc-path-regex@^0.1.2:
resolved "https://registry.yarnpkg.com/unc-path-regex/-/unc-path-regex-0.1.2.tgz#e73dd3d7b0d7c5ed86fbac6b0ae7d8c6a69d50fa" resolved "https://registry.yarnpkg.com/unc-path-regex/-/unc-path-regex-0.1.2.tgz#e73dd3d7b0d7c5ed86fbac6b0ae7d8c6a69d50fa"
integrity sha1-5z3T17DXxe2G+6xrCufYxqadUPo= integrity sha1-5z3T17DXxe2G+6xrCufYxqadUPo=
underscore@~1.6.0:
version "1.6.0"
resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.6.0.tgz#8b38b10cacdef63337b8b24e4ff86d45aea529a8"
integrity sha1-izixDKze9jM3uLJOT/htRa6lKag=
union-value@^1.0.0: union-value@^1.0.0:
version "1.0.0" version "1.0.0"
resolved "https://registry.yarnpkg.com/union-value/-/union-value-1.0.0.tgz#5c71c34cb5bad5dcebe3ea0cd08207ba5aa1aea4" resolved "https://registry.yarnpkg.com/union-value/-/union-value-1.0.0.tgz#5c71c34cb5bad5dcebe3ea0cd08207ba5aa1aea4"