From 07373578f9b13395e2cb5019a9afd44c39f7e936 Mon Sep 17 00:00:00 2001 From: chatelao Date: Thu, 5 Apr 2018 19:48:52 +0200 Subject: [PATCH 1/8] New maps: OpenPtMap, OpenRailWayMap, SafeCast added --- leaflet-providers.js | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/leaflet-providers.js b/leaflet-providers.js index cecf7a3f..f7df6040 100644 --- a/leaflet-providers.js +++ b/leaflet-providers.js @@ -110,6 +110,12 @@ maxZoom: 18 } }, + CH: { + url: 'https://tile.osm.ch/switzerland/{z}/{x}/{y}.png', + options: { + maxZoom: 18 + } + }, France: { url: 'https://{s}.tile.openstreetmap.fr/osmfr/{z}/{x}/{y}.png', options: { @@ -138,6 +144,13 @@ attribution: 'Map data: © OpenSeaMap contributors' } }, + OpenPtMap: { + maxZoom: 17, + url: 'http://openptmap.org/tiles/{z}/{x}/{y}.png', + options: { + attribution: 'Map data: © OpenPtMap contributors' + } + }, OpenTopoMap: { url: 'https://{s}.tile.opentopomap.org/{z}/{x}/{y}.png', options: { @@ -145,6 +158,20 @@ attribution: 'Map data: {attribution.OpenStreetMap}, SRTM | Map style: © OpenTopoMap (CC-BY-SA)' } }, + 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)' + } + }, + SafeCast: { + url: 'https://s3.amazonaws.com/te512.safecast.org/{z}/{x}/{y}.png', + options: { + maxZoom: 16, + attribution: 'Map data: {attribution.OpenStreetMap} | Map style: © SafeCast (CC-BY-SA)' + } + }, Thunderforest: { url: 'https://{s}.tile.thunderforest.com/{variant}/{z}/{x}/{y}.png?apikey={apikey}', options: { From 75f71659c187406d26d39d426c0b00a903c293b9 Mon Sep 17 00:00:00 2001 From: chatelao Date: Sat, 7 Apr 2018 15:28:04 +0200 Subject: [PATCH 2/8] OpenFireMap added --- leaflet-providers.js | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/leaflet-providers.js b/leaflet-providers.js index f7df6040..65fd9e71 100644 --- a/leaflet-providers.js +++ b/leaflet-providers.js @@ -138,6 +138,20 @@ } } }, + OpenInfraMap: { + url: 'https://tiles-{s}.openinframap.org/{variant}/{z}/{x}/{y}.png', + options: { + maxZoom: 18, + attribution: + '{attribution.OpenStreetMap}, About OpenInfraMap' + }, + variants: { + Power: 'power' + , Telecom: 'telecoms' + , Petroleum: 'petroleum' + , Water: 'water' + } + }, OpenSeaMap: { url: 'https://tiles.openseamap.org/seamark/{z}/{x}/{y}.png', options: { @@ -165,6 +179,13 @@ attribution: 'Map data: {attribution.OpenStreetMap} | Map style: © OpenRailwayMap (CC-BY-SA)' } }, + OpenFireMap: { + url: 'http://openfiremap.org/hytiles/{z}/{x}/{y}.png', + options: { + maxZoom: 19, + attribution: 'Map data: {attribution.OpenStreetMap} | Map style: © OpenFireMap (CC-BY-SA)' + } + }, SafeCast: { url: 'https://s3.amazonaws.com/te512.safecast.org/{z}/{x}/{y}.png', options: { From d5e7bd0ae7e2fa75553adc8d669415c238cf4eaa Mon Sep 17 00:00:00 2001 From: chatelao Date: Mon, 9 Apr 2018 12:25:31 +0200 Subject: [PATCH 3/8] Fix test errors (colon position) --- leaflet-providers.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/leaflet-providers.js b/leaflet-providers.js index 736b9eb7..d7142320 100644 --- a/leaflet-providers.js +++ b/leaflet-providers.js @@ -146,10 +146,10 @@ '{attribution.OpenStreetMap}, About OpenInfraMap' }, variants: { - Power: 'power' - , Telecom: 'telecoms' - , Petroleum: 'petroleum' - , Water: 'water' + Power: 'power' , + Telecom: 'telecoms' , + Petroleum: 'petroleum' , + Water: 'water' } }, OpenSeaMap: { From 4a3a8d21ab1b89d3ceb841ed7589b00ed001c96d Mon Sep 17 00:00:00 2001 From: chatelao Date: Wed, 11 Apr 2018 09:43:20 +0200 Subject: [PATCH 4/8] Fix zoomlevel in OpenPtMap layer --- leaflet-providers.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/leaflet-providers.js b/leaflet-providers.js index d7142320..61d417e3 100644 --- a/leaflet-providers.js +++ b/leaflet-providers.js @@ -159,9 +159,9 @@ } }, OpenPtMap: { - maxZoom: 17, url: 'http://openptmap.org/tiles/{z}/{x}/{y}.png', options: { + maxZoom: 17, attribution: 'Map data: © OpenPtMap contributors' } }, From 28aa79facab0bbb64d4cd3cfe5488def4b7ee974 Mon Sep 17 00:00:00 2001 From: chatelao Date: Wed, 11 Apr 2018 18:18:22 +0200 Subject: [PATCH 5/8] Allow double quotes in JSON (standard) --- .eslintrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.eslintrc b/.eslintrc index 62f19038..dc2d3c85 100644 --- a/.eslintrc +++ b/.eslintrc @@ -1,7 +1,7 @@ { "rules": { "camelcase": 2, - "quotes": [2, "single", "avoid-escape"], + "quotes": [2, "single", "double", "avoid-escape"], "no-mixed-spaces-and-tabs": [2, "smart-tabs"], "space-before-function-paren": 2, "space-in-parens": 2, From 42526a54ad49d3fec0238d39197d637bd83bbfbd Mon Sep 17 00:00:00 2001 From: chatelao Date: Wed, 11 Apr 2018 18:28:32 +0200 Subject: [PATCH 6/8] Soooory, revert in lint definition I just was in the wrong branch :-( --- .eslintrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.eslintrc b/.eslintrc index dc2d3c85..62f19038 100644 --- a/.eslintrc +++ b/.eslintrc @@ -1,7 +1,7 @@ { "rules": { "camelcase": 2, - "quotes": [2, "single", "double", "avoid-escape"], + "quotes": [2, "single", "avoid-escape"], "no-mixed-spaces-and-tabs": [2, "smart-tabs"], "space-before-function-paren": 2, "space-in-parens": 2, From 1187116228b37d2d418fe24f9cd92ad1c6cdd229 Mon Sep 17 00:00:00 2001 From: chatelao Date: Thu, 12 Apr 2018 21:43:56 +0200 Subject: [PATCH 7/8] Wikimedia retina and maxZoom, OSM.CH bounds Chg: maps.wikimedia.org - maxZoom 19 instead of 18 Add: maps.wikimedia.org - retina parameter 2x Add: openstreetmap.ch - bounding box --- leaflet-providers.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/leaflet-providers.js b/leaflet-providers.js index a250c71d..5b880075 100644 --- a/leaflet-providers.js +++ b/leaflet-providers.js @@ -113,7 +113,8 @@ CH: { url: 'https://tile.osm.ch/switzerland/{z}/{x}/{y}.png', options: { - maxZoom: 18 + maxZoom: 18, + bounds: [[45, 5], [48, 11]] } }, France: { @@ -730,11 +731,12 @@ } }, Wikimedia: { - url: 'https://maps.wikimedia.org/osm-intl/{z}/{x}/{y}.png', + url: 'https://maps.wikimedia.org/osm-intl/{z}/{x}/{y}{r}.png', options: { attribution: 'Wikimedia', minZoom: 1, - maxZoom: 18 + maxZoom: 19, + retina: '@2x' } } }; From bb508f2f06d0860766c0fc5cb98f91fe77151e59 Mon Sep 17 00:00:00 2001 From: chatelao Date: Thu, 12 Apr 2018 21:51:35 +0200 Subject: [PATCH 8/8] Fix wikimedia retina definition Just use the trivial {r} definition, because @2x is supported. --- leaflet-providers.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/leaflet-providers.js b/leaflet-providers.js index 5b880075..71a014b0 100644 --- a/leaflet-providers.js +++ b/leaflet-providers.js @@ -735,8 +735,7 @@ options: { attribution: 'Wikimedia', minZoom: 1, - maxZoom: 19, - retina: '@2x' + maxZoom: 19 } } };