From ef122b417d14dc44a2da7c61bc4438d62d81b50c Mon Sep 17 00:00:00 2001 From: ThatIsAPseudo <17936055+ThatIsAPseudo@users.noreply.github.com> Date: Sun, 24 Jul 2022 03:23:35 +0000 Subject: [PATCH] Add variants to OpenRailwayMap tiles Add the following variants for OpenRailwayMap tiles : 'Standard' (renamed the already existing one), 'Maxspeed', 'Signals', 'Electrification', 'Gauge'. See https://tiles.openrailwaymap.org. --- leaflet-providers.js | 41 +++++++++++++++++++++++++++++++++++++---- 1 file changed, 37 insertions(+), 4 deletions(-) diff --git a/leaflet-providers.js b/leaflet-providers.js index d45c48ed..836ca50a 100644 --- a/leaflet-providers.js +++ b/leaflet-providers.js @@ -144,10 +144,43 @@ } }, OpenRailwayMap: { - url: 'https://{s}.tiles.openrailwaymap.org/standard/{z}/{x}/{y}.png', - options: { - maxZoom: 19, - attribution: 'Map data: {attribution.OpenStreetMap} | Map style: © OpenRailwayMap (CC-BY-SA)' + variants: { + Standard: { + url: 'https://{s}.tiles.openrailwaymap.org/standard/{z}/{x}/{y}.png', + options: { + maxZoom: 19, + attribution: 'Map data: {attribution.OpenStreetMap} | Map style: © OpenRailwayMap (CC-BY-SA)' + } + }, + Maxspeed: { + url: 'https://{s}.tiles.openrailwaymap.org/maxspeed/{z}/{x}/{y}.png', + options: { + maxZoom: 19, + attribution: 'Map data: {attribution.OpenStreetMap} | Map style: © OpenRailwayMap (CC-BY-SA)' + } + }, + Signals: { + + url: 'https://{s}.tiles.openrailwaymap.org/signals/{z}/{x}/{y}.png', + options: { + maxZoom: 19, + attribution: 'Map data: {attribution.OpenStreetMap} | Map style: © OpenRailwayMap (CC-BY-SA)' + } + }, + Elecrification: { + url: 'https://{s}.tiles.openrailwaymap.org/electrification/{z}/{x}/{y}.png', + options: { + maxZoom: 19, + attribution: 'Map data: {attribution.OpenStreetMap} | Map style: © OpenRailwayMap (CC-BY-SA)' + } + }, + Gauge: { + url: 'https://{s}.tiles.openrailwaymap.org/gauge/{z}/{x}/{y}.png', + options: { + maxZoom: 19, + attribution: 'Map data: {attribution.OpenStreetMap} | Map style: © OpenRailwayMap (CC-BY-SA)' + } + } } }, OpenFireMap: {