commit 6e35823fa16292ffe0ade97fdbad95231126b0fd
parent 919d51a744b451468b108cf285bb49a26bda6a4a
Author: Sergej Orlov <wladimirych@gmail.com>
Date: Thu, 4 Dec 2025 19:26:36 +0100
leaflet.control.layers.configure: remove display of layer descriptions
Reasons:
- most descriptions were duplicates of attribution
- description not visible in layers control
Diffstat:
3 files changed, 4 insertions(+), 21 deletions(-)
diff --git a/src/layers.js b/src/layers.js
@@ -23,7 +23,6 @@ class LayerGroupWithOptions extends L.LayerGroup {
const layersDefs = [
{
title: 'OpenStreetMap',
- description: 'OSM default style',
isDefault: true,
layer: L.tileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png',
{
@@ -476,7 +475,6 @@ class LayerGroupWithOptions extends L.LayerGroup {
},
{
title: 'OpenCycleMap',
- description: '<a href="https://www.opencyclemap.org/docs/">(Info and key)</a>',
isDefault: false,
layer: new RetinaTileLayer(
[
@@ -516,7 +514,7 @@ class LayerGroupWithOptions extends L.LayerGroup {
},
{
title: 'Eurasia 25km',
- description: '1975-80',
+ // description: '1975-80',
isDefault: false,
layer: L.tileLayer("https://{s}.tiles.nakarte.me/eurasia25km/{z}/{x}/{y}",
{
@@ -587,7 +585,7 @@ class LayerGroupWithOptions extends L.LayerGroup {
},
{
title: 'Montenegro topo 250m',
- description: '1970-72',
+ // description: '1970-72',
isDefault: false,
layer: L.tileLayer("https://{s}.tiles.nakarte.me/montenegro250m/{z}/{x}/{y}",
{
@@ -605,8 +603,6 @@ class LayerGroupWithOptions extends L.LayerGroup {
},
{
title: 'Mountains by Aleksey Tsvetkov',
- description:
- 'Tian Shan, Dzungaria, <a href="http://pereval.g-utka.ru/">http://pereval.g-utka.ru/</a>',
isDefault: true,
layer: new LayerGroupWithOptions(
[
@@ -828,7 +824,6 @@ class LayerGroupWithOptions extends L.LayerGroup {
{
// Вместо 404 отдают 500 для отсутствующих тайлов
title: 'Norway roads',
- description: '<a href="https://kart.finn.no/">https://kart.finn.no/</a>',
isDefault: false,
layer: L.tileLayer("https://maptiles1.finncdn.no/tileService/1.0.3/normap/{z}/{x}/{y}.png",
{
@@ -897,7 +892,6 @@ class LayerGroupWithOptions extends L.LayerGroup {
},
{
title: 'Finland Topo',
- description: '<a href="https://laji.fi/en/map/">LAJI.FI</a>',
isDefault: false,
layer: L.tileLayer(
"https://proxy.laji.fi/mml_wmts/maasto/wmts/1.0.0/maastokartta/default/WGS84_Pseudo-Mercator/" +
@@ -951,8 +945,6 @@ class LayerGroupWithOptions extends L.LayerGroup {
},
{
title: 'Waymarked Cycling Trails',
- description:
- '<a href="https://cycling.waymarkedtrails.org/">https://cycling.waymarkedtrails.org</a>',
isDefault: false,
layer: L.tileLayer('https://tile.waymarkedtrails.org/cycling/{z}/{x}/{y}.png',
{
@@ -969,7 +961,6 @@ class LayerGroupWithOptions extends L.LayerGroup {
},
{
title: 'Waymarked Hiking Trails',
- description: '<a href="https://hiking.waymarkedtrails.org/">https://hiking.waymarkedtrails.org</a>',
isDefault: false,
layer: L.tileLayer('https://tile.waymarkedtrails.org/hiking/{z}/{x}/{y}.png',
{
@@ -986,7 +977,6 @@ class LayerGroupWithOptions extends L.LayerGroup {
},
{
title: 'Slovakia topo',
- description: '<a href="https://mapy.hiking.sk">https://mapy.hiking.sk/</a>',
isDefault: false,
layer: new LayerGroupWithOptions(
[
@@ -1203,7 +1193,7 @@ class LayerGroupWithOptions extends L.LayerGroup {
},
{
- title: 'Norway <a href="https://www.ut.no/kart/">https://www.ut.no/kart/</a>',
+ title: 'Norway',
layers: [
'Norway paper map',
'Norway topo',
diff --git a/src/lib/leaflet.control.layers.configure/index.js b/src/lib/leaflet.control.layers.configure/index.js
@@ -72,7 +72,6 @@ function enableConfig(control, {layers, customLayersOrder}) {
}
layer.enabled = enabled;
layer.checked = ko.observable(enabled);
- layer.description = layer.description || '';
}
this.updateEnabledLayers();
},
@@ -100,9 +99,7 @@ function enableConfig(control, {layers, customLayersOrder}) {
<label>
<input type="checkbox" data-bind="checked: checked"/>
<span data-bind="text: title">
- </span><!-- ko if: description -->
- <span data-bind="html: description || ''"></span>
- <!-- /ko -->
+ </span>
</label>
<!-- /ko -->
<!-- /ko -->
diff --git a/src/lib/leaflet.control.layers.configure/style.css b/src/lib/leaflet.control.layers.configure/style.css
@@ -93,10 +93,6 @@
font-weight: bold;
}
-.leaflet-layers-select-window a {
- color: #000;
-}
-
.leaflet-layers-select-window .section-header a {
color: #666;
}