From 428cc922e903aad514ff834f770b094365681b6b Mon Sep 17 00:00:00 2001 From: D-Groenewegen Date: Fri, 8 Nov 2024 16:05:24 +0100 Subject: [PATCH 1/4] Update leaflet-providers.js MapTiler: - Update NLS for different formats and zoom levels and add Bartholomew Quarter-Inch map of Ireland - Add MapTilerTiles (still incomplete) --- leaflet-providers.js | 173 ++++++++++++++++++++++++++++++++++++------- 1 file changed, 145 insertions(+), 28 deletions(-) diff --git a/leaflet-providers.js b/leaflet-providers.js index c6941f3..9385a93 100644 --- a/leaflet-providers.js +++ b/leaflet-providers.js @@ -120,12 +120,6 @@ attribution: '{attribution.OpenStreetMap}, Tiles courtesy of Breton OpenStreetMap Team', bounds: [[46.2, -5.5], [50, 0.7]] } - }, - CAT: { - url: 'https://tile.openstreetmap.bzh/ca/{z}/{x}/{y}.png', - options: { - attribution: '{attribution.OpenStreetMap}, Tiles courtesy of Breton OpenStreetMap Team', - } } } }, @@ -214,17 +208,6 @@ variants: { AlidadeSmooth: 'alidade_smooth', AlidadeSmoothDark: 'alidade_smooth_dark', - AlidadeSatellite: { - options: { - attribution: - '© CNES, Distribution Airbus DS, © Airbus DS, © PlanetObserver (Contains Copernicus Data) | ' + - '© Stadia Maps ' + - '© OpenMapTiles ' + - '{attribution.OpenStreetMap}', - variant: 'alidade_satellite', - ext: 'jpg', - } - }, OSMBright: 'osm_bright', Outdoors: 'outdoors', StamenToner: { @@ -462,6 +445,87 @@ Dataviz: 'dataviz' } }, + MapTilerTiles: { + // Not yet complete. For the NLS maps, see NLS below + url: 'https://api.maptiler.com/tiles/{variant}/{z}/{x}/{y}{format}?key={apikey}', + options: { + attribution: '© MapTiler', + format: '.pbf', + minZoom: 1, + maxZoom: 18, + apikey: '' + }, + variants: { + contours: { + variant: 'contours-v2', + format: '.pbf', + minZoom: 9, + maxZoom: 14 + }, + countries: { + variant: 'countries', + format: '.pbf', + minZoom: 0, + maxZoom: 11 + }, + handdrawnhillshade: { + variant: 'hand-drawn-hillshade', + format: '.webp', + minZoom: 0, + maxZoom: 7 + }, + satellite: { + variant: 'satellite-v2', + format: '.jpg', + minZoom: 0, + maxZoom: 22 + }, + jpforest: { + variant: 'jpg-forest', + format: '.png', + }, + jpgsibuilding: { + variant: 'jp-gsi-building', + format: '.pbf', + minZoom: 13, + maxZoom: 15 + }, + jphillshade: { + variant: 'jphillshade', + format: '.png' + }, + jpmierune: { + variant: 'jpmierune', + format: '.pbf' + minZoom: 0, + maxZoom: 15 + }, + nlcartigo: { + variant: 'nl-cartigo', + format: '.pbf', + minZoom: 0, + maxZoom: 16 + }, + cadastre: { + variant: 'cadastre', + format: '.pbf', + minZoom: 0, + maxZoom: 17 + }, + chswisstopolbm: { + variant: 'ch-swisstopo-lbm', + format: '.pbf', + minZoom: 0, + maxZoom: 14 + }, + ukopenzoomstack: { + variant: 'uk-openzoomstack', + format: '.pbf', + minZoom: 0, + maxZoom: 14 + } + } + }, TomTom: { url: 'https://{s}.api.tomtom.com/map/1/tile/{variant}/{style}/{z}/{x}/{y}.{ext}?key={apikey}', options: { @@ -494,6 +558,14 @@ 'Source: Esri, DeLorme, NAVTEQ, USGS, Intermap, iPC, NRCAN, Esri Japan, METI, Esri China (Hong Kong), Esri (Thailand), TomTom, 2012' } }, + DeLorme: { + options: { + variant: 'Specialty/DeLorme_World_Base_Map', + minZoom: 1, + maxZoom: 11, + attribution: '{attribution.Esri} — Copyright: ©2012 DeLorme' + } + }, WorldTopoMap: { options: { variant: 'World_Topo_Map', @@ -975,7 +1047,7 @@ }, ModisTerraChlorophyll: { options: { - variant: 'MODIS_Terra_L2_Chlorophyll_A', + variant: 'MODIS_Terra_Chlorophyll_A', format: 'png', maxZoom: 7, opacity: 0.75 @@ -992,22 +1064,64 @@ // z0-9 - 1:1m // z10-11 - quarter inch (1:253440) // z12-18 - one inch (1:63360) - url: 'https://api.maptiler.com/tiles/{variant}/{z}/{x}/{y}.jpg?key={apikey}', + url: 'https://api.maptiler.com/tiles/{variant}/{z}/{x}/{y}{format}?key={apikey}', options: { - attribution: 'National Library of Scotland Historic Maps', + attribution: 'National Library of Scotland Historic Maps / MapTiler', bounds: [[49.6, -12], [61.7, 3]], + format: '.jpg', minZoom: 1, maxZoom: 18, apikey: '' }, variants: { - osgb63k1885: 'uk-osgb63k1885', - osgb1888: 'uk-osgb1888', - osgb10k1888: 'uk-osgb10k1888', - osgb1919: 'uk-osgb1919', - osgb25k1937: 'uk-osgb25k1937', - osgb63k1955: 'uk-osgb63k1955', - oslondon1k1893: 'uk-oslondon1k1893' + osgb63k1885: { + variant: 'uk-osgb63k1885', + format: '.png', + minZoom: 1, + maxZoom: 16 + }, + osgb1888: { + variant: 'uk-osgb1888', + format: '', + minZoom: 1, + maxZoom: 17 + }, + osgb10k1888: { + variant: 'uk-osgb10k1888', + format: '.jpg', + minZoom: 1, + maxZoom: 17 + }, + osgb1919: { + variant: 'uk-osgb1919', + format: '.jpg', + minZoom: 1, + maxZoom: 14 + }, + osgb25k1937: { + variant: 'uk-osgb25k1937', + format: '.jpg', + minZoom: 1, + maxZoom: 16 + }, + osgb63k1955: { + variant: 'uk-osgb63k1955', + format: '.jpg', + minZoom: 1, + maxZoom: 15 + }, + oslondon1k1893: { + variant: 'uk-oslondon1k1893', + format: '.jpg', + minZoom: 9, + maxZoom: 20 + }, + baire250k1940: { + variant: 'uk-baire250k1940', + format: '.png', + minZoom: 5, + maxZoom: 12 + } } }, JusticeMap: { @@ -1035,12 +1149,15 @@ } }, GeoportailFrance: { - url: 'https://data.geopf.fr/wmts?REQUEST=GetTile&SERVICE=WMTS&VERSION=1.0.0&STYLE={style}&TILEMATRIXSET=PM&FORMAT={format}&LAYER={variant}&TILEMATRIX={z}&TILEROW={y}&TILECOL={x}', + url: 'https://wxs.ign.fr/{apikey}/geoportail/wmts?REQUEST=GetTile&SERVICE=WMTS&VERSION=1.0.0&STYLE={style}&TILEMATRIXSET=PM&FORMAT={format}&LAYER={variant}&TILEMATRIX={z}&TILEROW={y}&TILECOL={x}', options: { attribution: 'Geoportail France', bounds: [[-75, -180], [81, 180]], minZoom: 2, maxZoom: 18, + // Get your own geoportail apikey here : http://professionnels.ign.fr/ign/contrats/ + // NB : 'choisirgeoportail' is a demonstration key that comes with no guarantee + apikey: 'choisirgeoportail', format: 'image/png', style: 'normal', variant: 'GEOGRAPHICALGRIDSYSTEMS.PLANIGNV2' From 78dc8be4afa499b3bd7d6ddbd6e529992294dd1f Mon Sep 17 00:00:00 2001 From: D-Groenewegen Date: Fri, 8 Nov 2024 16:12:23 +0100 Subject: [PATCH 2/4] Update leaflet-providers.js MapTiler updates: - NLS, taking care of different formats and zoom levels + add Bartholomew Quarter Inch map of Ireland - new MapTilerTiles, still incomplete --- leaflet-providers.js | 36 +++++++++++++++++++++--------------- 1 file changed, 21 insertions(+), 15 deletions(-) diff --git a/leaflet-providers.js b/leaflet-providers.js index 9385a93..3807f6f 100644 --- a/leaflet-providers.js +++ b/leaflet-providers.js @@ -120,6 +120,12 @@ attribution: '{attribution.OpenStreetMap}, Tiles courtesy of Breton OpenStreetMap Team', bounds: [[46.2, -5.5], [50, 0.7]] } + }, + CAT: { + url: 'https://tile.openstreetmap.bzh/ca/{z}/{x}/{y}.png', + options: { + attribution: '{attribution.OpenStreetMap}, Tiles courtesy of Breton OpenStreetMap Team', + } } } }, @@ -208,6 +214,17 @@ variants: { AlidadeSmooth: 'alidade_smooth', AlidadeSmoothDark: 'alidade_smooth_dark', + AlidadeSatellite: { + options: { + attribution: + '© CNES, Distribution Airbus DS, © Airbus DS, © PlanetObserver (Contains Copernicus Data) | ' + + '© Stadia Maps ' + + '© OpenMapTiles ' + + '{attribution.OpenStreetMap}', + variant: 'alidade_satellite', + ext: 'jpg', + } + }, OSMBright: 'osm_bright', Outdoors: 'outdoors', StamenToner: { @@ -496,7 +513,7 @@ }, jpmierune: { variant: 'jpmierune', - format: '.pbf' + format: '.pbf', minZoom: 0, maxZoom: 15 }, @@ -525,7 +542,7 @@ maxZoom: 14 } } - }, + }, TomTom: { url: 'https://{s}.api.tomtom.com/map/1/tile/{variant}/{style}/{z}/{x}/{y}.{ext}?key={apikey}', options: { @@ -558,14 +575,6 @@ 'Source: Esri, DeLorme, NAVTEQ, USGS, Intermap, iPC, NRCAN, Esri Japan, METI, Esri China (Hong Kong), Esri (Thailand), TomTom, 2012' } }, - DeLorme: { - options: { - variant: 'Specialty/DeLorme_World_Base_Map', - minZoom: 1, - maxZoom: 11, - attribution: '{attribution.Esri} — Copyright: ©2012 DeLorme' - } - }, WorldTopoMap: { options: { variant: 'World_Topo_Map', @@ -1047,7 +1056,7 @@ }, ModisTerraChlorophyll: { options: { - variant: 'MODIS_Terra_Chlorophyll_A', + variant: 'MODIS_Terra_L2_Chlorophyll_A', format: 'png', maxZoom: 7, opacity: 0.75 @@ -1149,15 +1158,12 @@ } }, GeoportailFrance: { - url: 'https://wxs.ign.fr/{apikey}/geoportail/wmts?REQUEST=GetTile&SERVICE=WMTS&VERSION=1.0.0&STYLE={style}&TILEMATRIXSET=PM&FORMAT={format}&LAYER={variant}&TILEMATRIX={z}&TILEROW={y}&TILECOL={x}', + url: 'https://data.geopf.fr/wmts?REQUEST=GetTile&SERVICE=WMTS&VERSION=1.0.0&STYLE={style}&TILEMATRIXSET=PM&FORMAT={format}&LAYER={variant}&TILEMATRIX={z}&TILEROW={y}&TILECOL={x}', options: { attribution: 'Geoportail France', bounds: [[-75, -180], [81, 180]], minZoom: 2, maxZoom: 18, - // Get your own geoportail apikey here : http://professionnels.ign.fr/ign/contrats/ - // NB : 'choisirgeoportail' is a demonstration key that comes with no guarantee - apikey: 'choisirgeoportail', format: 'image/png', style: 'normal', variant: 'GEOGRAPHICALGRIDSYSTEMS.PLANIGNV2' From c2d87ed5725620a84f13c893be367eec4fa1142a Mon Sep 17 00:00:00 2001 From: D-Groenewegen Date: Fri, 8 Nov 2024 16:54:52 +0100 Subject: [PATCH 3/4] Update leaflet-providers.js nest options in 'options' --- leaflet-providers.js | 195 ++++++++++++++++++++++++++----------------- 1 file changed, 118 insertions(+), 77 deletions(-) diff --git a/leaflet-providers.js b/leaflet-providers.js index 3807f6f..f10f822 100644 --- a/leaflet-providers.js +++ b/leaflet-providers.js @@ -466,6 +466,7 @@ // Not yet complete. For the NLS maps, see NLS below url: 'https://api.maptiler.com/tiles/{variant}/{z}/{x}/{y}{format}?key={apikey}', options: { + variant: 'contours', attribution: '© MapTiler', format: '.pbf', minZoom: 1, @@ -474,75 +475,99 @@ }, variants: { contours: { - variant: 'contours-v2', - format: '.pbf', - minZoom: 9, - maxZoom: 14 + options: { + variant: 'contours-v2', + format: '.pbf', + minZoom: 9, + maxZoom: 14 + } }, countries: { - variant: 'countries', - format: '.pbf', - minZoom: 0, - maxZoom: 11 + options: { + variant: 'countries', + format: '.pbf', + minZoom: 0, + maxZoom: 11 + } }, handdrawnhillshade: { - variant: 'hand-drawn-hillshade', - format: '.webp', - minZoom: 0, - maxZoom: 7 + options: { + variant: 'hand-drawn-hillshade', + format: '.webp', + minZoom: 0, + maxZoom: 7 + } }, satellite: { - variant: 'satellite-v2', - format: '.jpg', - minZoom: 0, - maxZoom: 22 + options: { + variant: 'satellite-v2', + format: '.jpg', + minZoom: 0, + maxZoom: 22 + } }, jpforest: { - variant: 'jpg-forest', - format: '.png', + options: { + variant: 'jpg-forest', + format: '.png' + } }, jpgsibuilding: { - variant: 'jp-gsi-building', - format: '.pbf', - minZoom: 13, - maxZoom: 15 + options: { + variant: 'jp-gsi-building', + format: '.pbf', + minZoom: 13, + maxZoom: 15 + } }, jphillshade: { - variant: 'jphillshade', - format: '.png' + options: { + variant: 'jphillshade', + format: '.png' + } }, jpmierune: { - variant: 'jpmierune', - format: '.pbf', - minZoom: 0, - maxZoom: 15 + options: { + variant: 'jpmierune', + format: '.pbf', + minZoom: 0, + maxZoom: 15 + } }, nlcartigo: { - variant: 'nl-cartigo', - format: '.pbf', - minZoom: 0, - maxZoom: 16 + options: { + variant: 'nl-cartigo', + format: '.pbf', + minZoom: 0, + maxZoom: 16 + } }, cadastre: { - variant: 'cadastre', - format: '.pbf', - minZoom: 0, - maxZoom: 17 + options: { + variant: 'cadastre', + format: '.pbf', + minZoom: 0, + maxZoom: 17 + } }, chswisstopolbm: { - variant: 'ch-swisstopo-lbm', - format: '.pbf', - minZoom: 0, - maxZoom: 14 + options: { + variant: 'ch-swisstopo-lbm', + format: '.pbf', + minZoom: 0, + maxZoom: 14 + } }, ukopenzoomstack: { - variant: 'uk-openzoomstack', - format: '.pbf', - minZoom: 0, - maxZoom: 14 + options: { + variant: 'uk-openzoomstack', + format: '.pbf', + minZoom: 0, + maxZoom: 14 + } } } - }, + }, TomTom: { url: 'https://{s}.api.tomtom.com/map/1/tile/{variant}/{style}/{z}/{x}/{y}.{ext}?key={apikey}', options: { @@ -1084,52 +1109,68 @@ }, variants: { osgb63k1885: { - variant: 'uk-osgb63k1885', - format: '.png', - minZoom: 1, - maxZoom: 16 + options: { + variant: 'uk-osgb63k1885', + format: '.png', + minZoom: 1, + maxZoom: 16 + } }, osgb1888: { - variant: 'uk-osgb1888', - format: '', - minZoom: 1, - maxZoom: 17 + options: { + variant: 'uk-osgb1888', + format: '', + minZoom: 1, + maxZoom: 17 + } }, osgb10k1888: { - variant: 'uk-osgb10k1888', - format: '.jpg', - minZoom: 1, - maxZoom: 17 + options: { + variant: 'uk-osgb10k1888', + format: '.jpg', + minZoom: 1, + maxZoom: 17 + } }, osgb1919: { - variant: 'uk-osgb1919', - format: '.jpg', - minZoom: 1, - maxZoom: 14 + options: { + variant: 'uk-osgb1919', + format: '.jpg', + minZoom: 1, + maxZoom: 14 + } }, osgb25k1937: { - variant: 'uk-osgb25k1937', - format: '.jpg', - minZoom: 1, - maxZoom: 16 + options: { + variant: 'uk-osgb25k1937', + format: '.jpg', + minZoom: 1, + maxZoom: 16 + } }, osgb63k1955: { - variant: 'uk-osgb63k1955', - format: '.jpg', - minZoom: 1, - maxZoom: 15 + options: { + variant: 'uk-osgb63k1955', + format: '.jpg', + minZoom: 1, + maxZoom: 15 + } }, oslondon1k1893: { - variant: 'uk-oslondon1k1893', - format: '.jpg', - minZoom: 9, - maxZoom: 20 + options: { + variant: 'uk-oslondon1k1893', + format: '.jpg', + minZoom: 9, + maxZoom: 20 + } }, baire250k1940: { - variant: 'uk-baire250k1940', - format: '.png', - minZoom: 5, - maxZoom: 12 + options: { + variant: 'uk-baire250k1940', + format: '.png', + minZoom: 5, + maxZoom: 12 + } } } }, From 7c50d3031f8fc75b58709a340f593623ae61a99a Mon Sep 17 00:00:00 2001 From: D-Groenewegen Date: Fri, 8 Nov 2024 23:40:53 +0100 Subject: [PATCH 4/4] Update leaflet-providers.js improvements to MapTilerTiles and NLS: - remove variants not supported by Leaflet --- leaflet-providers.js | 105 +++++++++++++++++-------------------------- 1 file changed, 42 insertions(+), 63 deletions(-) diff --git a/leaflet-providers.js b/leaflet-providers.js index f10f822..7091e62 100644 --- a/leaflet-providers.js +++ b/leaflet-providers.js @@ -463,33 +463,14 @@ } }, MapTilerTiles: { - // Not yet complete. For the NLS maps, see NLS below + // For the NLS maps, see NLS below url: 'https://api.maptiler.com/tiles/{variant}/{z}/{x}/{y}{format}?key={apikey}', options: { - variant: 'contours', + variant: 'satellite', attribution: '© MapTiler', - format: '.pbf', - minZoom: 1, - maxZoom: 18, apikey: '' }, variants: { - contours: { - options: { - variant: 'contours-v2', - format: '.pbf', - minZoom: 9, - maxZoom: 14 - } - }, - countries: { - options: { - variant: 'countries', - format: '.pbf', - minZoom: 0, - maxZoom: 11 - } - }, handdrawnhillshade: { options: { variant: 'hand-drawn-hillshade', @@ -506,68 +487,61 @@ maxZoom: 22 } }, - jpforest: { - options: { - variant: 'jpg-forest', - format: '.png' - } - }, - jpgsibuilding: { + satellitemediumres: { options: { - variant: 'jp-gsi-building', - format: '.pbf', - minZoom: 13, - maxZoom: 15 + variant: 'satellite-mediumres', + format: '.jpg', + minZoom: 0, + maxZoom: 13 } }, - jphillshade: { - options: { - variant: 'jphillshade', - format: '.png' + satellitemediumres2018: { + options: { + variant: 'satellite-mediumres-2018', + format: '.jpg', + minZoom: 0, + maxZoom: 13 } }, - jpmierune: { + czsatellite5514: { options: { - variant: 'jpmierune', - format: '.pbf', + variant: 'cz-satellite-5514', + format: '.jpg', minZoom: 0, - maxZoom: 15 + maxZoom: 9 } }, - nlcartigo: { + jpforest: { options: { - variant: 'nl-cartigo', - format: '.pbf', - minZoom: 0, - maxZoom: 16 + variant: 'jp-forest', + format: '.png' } }, - cadastre: { + jphillshade: { options: { - variant: 'cadastre', - format: '.pbf', - minZoom: 0, - maxZoom: 17 + variant: 'jphillshade', + format: '.png' } }, - chswisstopolbm: { + nltopraster: { options: { - variant: 'ch-swisstopo-lbm', - format: '.pbf', - minZoom: 0, - maxZoom: 14 + variant: 'nl-topraster', + format: '.png', + minZoom: 5, + maxZoom: 16 } }, - ukopenzoomstack: { + nltopraster28992: { options: { - variant: 'uk-openzoomstack', - format: '.pbf', + variant: 'nl-topraster-28992', + format: '.png', minZoom: 0, - maxZoom: 14 + maxZoom: 11 } } } }, + TomTom: { url: 'https://{s}.api.tomtom.com/map/1/tile/{variant}/{style}/{z}/{x}/{y}.{ext}?key={apikey}', options: { @@ -1090,9 +1064,9 @@ } }, NLS: { - // NLS maps are copyright National library of Scotland. + // NLS maps are copyright National Library of Scotland. // http://maps.nls.uk/projects/subscription-api - // Please contact NLS for anything other than non-commercial low volume usage + // Please contact NLS for anything other than non-commercial low-volume usage // // Map sources: Ordnance Survey 1:1m to 1:63K, 1880s-1961 // z0-9 - 1:1m @@ -1101,7 +1075,6 @@ url: 'https://api.maptiler.com/tiles/{variant}/{z}/{x}/{y}{format}?key={apikey}', options: { attribution: 'National Library of Scotland Historic Maps / MapTiler', - bounds: [[49.6, -12], [61.7, 3]], format: '.jpg', minZoom: 1, maxZoom: 18, @@ -1111,6 +1084,7 @@ osgb63k1885: { options: { variant: 'uk-osgb63k1885', + bounds: [[49.6, -12], [61.7, 3]], format: '.png', minZoom: 1, maxZoom: 16 @@ -1119,6 +1093,7 @@ osgb1888: { options: { variant: 'uk-osgb1888', + bounds: [[49.6, -12], [61.7, 3]], format: '', minZoom: 1, maxZoom: 17 @@ -1127,6 +1102,7 @@ osgb10k1888: { options: { variant: 'uk-osgb10k1888', + bounds: [[49.6, -12], [61.7, 3]], format: '.jpg', minZoom: 1, maxZoom: 17 @@ -1135,6 +1111,7 @@ osgb1919: { options: { variant: 'uk-osgb1919', + bounds: [[49.6, -12], [61.7, 3]], format: '.jpg', minZoom: 1, maxZoom: 14 @@ -1143,6 +1120,7 @@ osgb25k1937: { options: { variant: 'uk-osgb25k1937', + bounds: [[49.6, -12], [61.7, 3]], format: '.jpg', minZoom: 1, maxZoom: 16 @@ -1151,6 +1129,7 @@ osgb63k1955: { options: { variant: 'uk-osgb63k1955', + bounds: [[49.6, -12], [61.7, 3]], format: '.jpg', minZoom: 1, maxZoom: 15 @@ -1171,7 +1150,7 @@ minZoom: 5, maxZoom: 12 } - } + }, } }, JusticeMap: {