PageSourceSearch

https://www.sern.org.nz/site/modules/FieldtypeLeafletMapLocation/leaflet-providers/leaflet-providers.js

js sern.org.nz collected 2026-10-08 11:21:45 UTC 32,423 bytes, 1,100 lines download raw bytes

vendor: 24,758 bytes, lines 1-862
1(function (root, factory) {
2	if (typeof define === 'function' && define.amd) {
3		// AMD. Register as an anonymous module.
4		define(['leaflet'], factory);
5	} else if (typeof modules === 'object' && module.exports) {
6		// define a Common JS module that relies on 'leaflet'
7		module.exports = factory(require('leaflet'));
8	} else {
9		// Assume Leaflet is loaded into global object L already
10		factory(L);
11	}
12}(this, function (L) {
13	'use strict';
14
15	L.TileLayer.Provider = L.TileLayer.extend({
16		initialize: function (arg, options) {
17			var providers = L.TileLayer.Provider.providers;
18
19			var parts = arg.split('.');
20
21			var providerName = parts[0];
22			var variantName = parts[1];
23
24			if (!providers[providerName]) {
25				throw 'No such provider (' + providerName + ')';
26			}
27
28			var provider = {
29				url: providers[providerName].url,
30				options: providers[providerName].options
31			};
32
33			// overwrite values in provider from variant.
34			if (variantName && 'variants' in providers[providerName]) {
35				if (!(variantName in providers[providerName].variants)) {
36					throw 'No such variant of ' + providerName + ' (' + variantName + ')';
37				}
38				var variant = providers[providerName].variants[variantName];
39				var variantOptions;
40				if (typeof variant === 'string') {
41					variantOptions = {
42						variant: variant
43					};
44				} else {
45					variantOptions = variant.options;
46				}
47				provider = {
48					url: variant.url || provider.url,
49					options: L.Util.extend({}, provider.options, variantOptions)
50				};
51			}
52
53			// replace attribution placeholders with their values from toplevel provider attribution,
54			// recursively
55			var attributionReplacer = function (attr) {
56				if (attr.indexOf('{attribution.') === -1) {
57					return attr;
58				}
59				return attr.replace(/\{attribution.(\w*)\}/g,
60					function (match, attributionName) {
61						return attributionReplacer(providers[attributionName].options.attribution);
62					}
63				);
64			};
65			provider.options.attribution = attributionReplacer(provider.options.attribution);
66
67			// Compute final options combining provider options with any user overrides
68			var layerOpts = L.Util.extend({}, provider.options, options);
69			L.TileLayer.prototype.initialize.call(this, provider.url, layerOpts);
70		}
71	});
72
73	/**
74	 * Definition of providers.
75	 * see http://leafletjs.com/reference.html#tilelayer for options in the options map.
76	 */
77
78	L.TileLayer.Provider.providers = {
79		OpenStreetMap: {
80			url: 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
81			options: {
82				maxZoom: 19,
83				attribution:
84					'&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
85			},
86			variants: {
87				Mapnik: {},
88				DE: {
89					url: 'https://{s}.tile.openstreetmap.de/tiles/osmde/{z}/{x}/{y}.png',
90					options: {
91						maxZoom: 18
92					}
93				},
94				CH: {
95					url: 'https://tile.osm.ch/switzerland/{z}/{x}/{y}.png',
96					options: {
97						maxZoom: 18,
98						bounds: [[45, 5], [48, 11]]
99					}
100				},
101				France: {
102					url: 'https://{s}.tile.openstreetmap.fr/osmfr/{z}/{x}/{y}.png',
103					options: {
104						maxZoom: 20,
105						attribution: '&copy; OpenStreetMap France | {attribution.OpenStreetMap}'
106					}
107				},
108				HOT: {
109					url: 'https://{s}.tile.openstreetmap.fr/hot/{z}/{x}/{y}.png',
110					options: {
111						attribution:
112							'{attribution.OpenStreetMap}, ' +
113							'Tiles style by <a href="https://www.hotosm.org/" target="_blank">Humanitarian OpenStreetMap Team</a> ' +
114							'hosted by <a href="https://openstreetmap.fr/" target="_blank">OpenStreetMap France</a>'
115					}
116				},
117				BZH: {
118					url: 'https://tile.openstreetmap.bzh/br/{z}/{x}/{y}.png',
119					options: {
120						attribution: '{attribution.OpenStreetMap}, Tiles courtesy of <a href="http://www.openstreetmap.bzh/" target="_blank">Breton OpenStreetMap Team</a>',
121						bounds: [[46.2, -5.5], [50, 0.7]]
122					}
123				}
124			}
125		},
126		OpenSeaMap: {
127			url: 'https://tiles.openseamap.org/seamark/{z}/{x}/{y}.png',
128			options: {
129				attribution: 'Map data: &copy; <a href="http://www.openseamap.org">OpenSeaMap</a> contributors'
130			}
131		},
132		OPNVKarte: {
133			url: 'https://tileserver.memomaps.de/tilegen/{z}/{x}/{y}.png',
134			options: {
135				maxZoom: 18,
136				attribution: 'Map <a href="https://memomaps.de/">memomaps.de</a> <a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, map data {attribution.OpenStreetMap}'
137			}
138		},
139		OpenTopoMap: {
140			url: 'https://{s}.tile.opentopomap.org/{z}/{x}/{y}.png',
141			options: {
142				maxZoom: 17,
143				attribution: 'Map data: {attribution.OpenStreetMap}, <a href="http://viewfinderpanoramas.org">SRTM</a> | Map style: &copy; <a href="https://opentopomap.org">OpenTopoMap</a> (<a href="https://creativecommons.org/licenses/by-sa/3.0/">CC-BY-SA</a>)'
144			}
145		},
146		OpenRailwayMap: {
147			url: 'https://{s}.tiles.openrailwaymap.org/standard/{z}/{x}/{y}.png',
148			options: {
149				maxZoom: 19,
150				attribution: 'Map data: {attribution.OpenStreetMap} | Map style: &copy; <a href="https://www.OpenRailwayMap.org">OpenRailwayMap</a> (<a href="https://creativecommons.org/licenses/by-sa/3.0/">CC-BY-SA</a>)'
151			}
152		},
153		OpenFireMap: {
154			url: 'http://openfiremap.org/hytiles/{z}/{x}/{y}.png',
155			options: {
156				maxZoom: 19,
157				attribution: 'Map data: {attribution.OpenStreetMap} | Map style: &copy; <a href="http://www.openfiremap.org">OpenFireMap</a> (<a href="https://creativecommons.org/licenses/by-sa/3.0/">CC-BY-SA</a>)'
158			}
159		},
160		SafeCast: {
161			url: 'https://s3.amazonaws.com/te512.safecast.org/{z}/{x}/{y}.png',
162			options: {
163				maxZoom: 16,
164				attribution: 'Map data: {attribution.OpenStreetMap} | Map style: &copy; <a href="https://blog.safecast.org/about/">SafeCast</a> (<a href="https://creativecommons.org/licenses/by-sa/3.0/">CC-BY-SA</a>)'
165			}
166		},
167		Stadia: {
168			url: 'https://tiles.stadiamaps.com/tiles/alidade_smooth/{z}/{x}/{y}{r}.png',
169			options: {
170				maxZoom: 20,
171				attribution: '&copy; <a href="https://stadiamaps.com/">Stadia Maps</a>, &copy; <a href="https://openmaptiles.org/">OpenMapTiles</a> &copy; <a href="http://openstreetmap.org">OpenStreetMap</a> contributors'
172			},
173			variants: {
174				AlidadeSmooth: {
175					url: 'https://tiles.stadiamaps.com/tiles/alidade_smooth/{z}/{x}/{y}{r}.png'
176				},
177				AlidadeSmoothDark: {
178					url: 'https://tiles.stadiamaps.com/tiles/alidade_smooth_dark/{z}/{x}/{y}{r}.png'
179				},
180				OSMBright: {
181					url: 'https://tiles.stadiamaps.com/tiles/osm_bright/{z}/{x}/{y}{r}.png'
182				},
183				Outdoors: {
184					url: 'https://tiles.stadiamaps.com/tiles/outdoors/{z}/{x}/{y}{r}.png'
185				}
186			}
187		},
188		Thunderforest: {
189			url: 'https://{s}.tile.thunderforest.com/{variant}/{z}/{x}/{y}.png?apikey={apikey}',
190			options: {
191				attribution:
192					'&copy; <a href="http://www.thunderforest.com/">Thunderforest</a>, {attribution.OpenStreetMap}',
193				variant: 'cycle',
194				apikey: '<insert your api key here>',
195				maxZoom: 22
196			},
197			variants: {
198				OpenCycleMap: 'cycle',
199				Transport: {
200					options: {
201						variant: 'transport'
202					}
203				},
204				TransportDark: {
205					options: {
206						variant: 'transport-dark'
207					}
208				},
209				SpinalMap: {
210					options: {
211						variant: 'spinal-map'
212					}
213				},
214				Landscape: 'landscape',
215				Outdoors: 'outdoors',
216				Pioneer: 'pioneer',
217				MobileAtlas: 'mobile-atlas',
218				Neighbourhood: 'neighbourhood'
219			}
220		},
221		CyclOSM: {
222			url: 'https://{s}.tile-cyclosm.openstreetmap.fr/cyclosm/{z}/{x}/{y}.png',
223			options: {
224				maxZoom: 20,
225				attribution: '<a href="https://github.com/cyclosm/cyclosm-cartocss-style/releases" title="CyclOSM - Open Bicycle render">CyclOSM</a> | Map data: {attribution.OpenStreetMap}'
226			}
227		},
228		Hydda: {
229			url: 'https://{s}.tile.openstreetmap.se/hydda/{variant}/{z}/{x}/{y}.png',
230			options: {
231				maxZoom: 20,
232				variant: 'full',
233				attribution: 'Tiles courtesy of <a href="http://openstreetmap.se/" target="_blank">OpenStreetMap Sweden</a> &mdash; Map data {attribution.OpenStreetMap}'
234			},
235			variants: {
236				Full: 'full',
237				Base: 'base',
238				RoadsAndLabels: 'roads_and_labels'
239			}
240		},
241		Jawg: {
242			url: 'https://{s}.tile.jawg.io/{variant}/{z}/{x}/{y}{r}.png?access-token={accessToken}',
243			options: {
244				attribution:
245					'<a href="http://jawg.io" title="Tiles Courtesy of Jawg Maps" target="_blank">&copy; <b>Jawg</b>Maps</a> ' +
246					'{attribution.OpenStreetMap}',
247				minZoom: 0,
248				maxZoom: 22,
249				subdomains: 'abcd',
250				variant: 'jawg-terrain',
251				// Get your own Jawg access token here : https://www.jawg.io/lab/
252				// NB : this is a demonstration key that comes with no guarantee
253				accessToken: '<insert your access token here>',
254			},
255			variants: {
256				Streets: 'jawg-streets',
257				Terrain: 'jawg-terrain',
258				Sunny: 'jawg-sunny',
259				Dark: 'jawg-dark',
260				Light: 'jawg-light',
261				Matrix: 'jawg-matrix'
262			}
263		},
264		MapBox: {
265			url: 'https://api.mapbox.com/styles/v1/{id}/tiles/{z}/{x}/{y}{r}?access_token={accessToken}',
266			options: {
267				attribution:
268					'&copy; <a href="https://www.mapbox.com/about/maps/" target="_blank">Mapbox</a> ' +
269					'{attribution.OpenStreetMap} ' +
270					'<a href="https://www.mapbox.com/map-feedback/" target="_blank">Improve this map</a>',
271				tileSize: 512,
272				maxZoom: 18,
273				zoomOffset: -1,
274				id: 'mapbox/streets-v11',
275				accessToken: '<insert your access token here>',
276			}
277		},
278		MapTiler: {
279			url: 'https://api.maptiler.com/maps/{variant}/{z}/{x}/{y}{r}.{ext}?key={key}',
280			options: {
281				attribution:
282					'<a href="https://www.maptiler.com/copyright/" target="_blank">&copy; MapTiler</a> <a href="https://www.openstreetmap.org/copyright" target="_blank">&copy; OpenStreetMap contributors</a>',
283				variant: 'streets',
284				ext: 'png',
285				key: '<insert your MapTiler Cloud API key here>',
286				tileSize: 512,
287				zoomOffset: -1,
288				minZoom: 0,
289				maxZoom: 21
290			},
291			variants: {
292				Streets: 'streets',
293				Basic: 'basic',
294				Bright: 'bright',
295				Pastel: 'pastel',
296				Positron: 'positron',
297				Hybrid: {
298					options: {
299						variant: 'hybrid',
300						ext: 'jpg'
301					}
302				},
303				Toner: 'toner',
304				Topo: 'topo',
305				Voyager: 'voyager'
306			}
307		},
308		Stamen: {
309			url: 'https://stamen-tiles-{s}.a.ssl.fastly.net/{variant}/{z}/{x}/{y}{r}.{ext}',
310			options: {
311				attribution:
312					'Map tiles by <a href="http://stamen.com">Stamen Design</a>, ' +
313					'<a href="http://creativecommons.org/licenses/by/3.0">CC BY 3.0</a> &mdash; ' +
314					'Map data {attribution.OpenStreetMap}',
315				subdomains: 'abcd',
316				minZoom: 0,
317				maxZoom: 20,
318				variant: 'toner',
319				ext: 'png'
320			},
321			variants: {
322				Toner: 'toner',
323				TonerBackground: 'toner-background',
324				TonerHybrid: 'toner-hybrid',
325				TonerLines: 'toner-lines',
326				TonerLabels: 'toner-labels',
327				TonerLite: 'toner-lite',
328				Watercolor: {
329					url: 'https://stamen-tiles-{s}.a.ssl.fastly.net/{variant}/{z}/{x}/{y}.{ext}',
330					options: {
331						variant: 'watercolor',
332						ext: 'jpg',
333						minZoom: 1,
334						maxZoom: 16
335					}
336				},
337				Terrain: {
338					options: {
339						variant: 'terrain',
340						minZoom: 0,
341						maxZoom: 18
342					}
343				},
344				TerrainBackground: {
345					options: {
346						variant: 'terrain-background',
347						minZoom: 0,
348						maxZoom: 18
349					}
350				},
351				TerrainLabels: {
352					options: {
353						variant: 'terrain-labels',
354						minZoom: 0,
355						maxZoom: 18
356					}
357				},
358				TopOSMRelief: {
359					url: 'https://stamen-tiles-{s}.a.ssl.fastly.net/{variant}/{z}/{x}/{y}.{ext}',
360					options: {
361						variant: 'toposm-color-relief',
362						ext: 'jpg',
363						bounds: [[22, -132], [51, -56]]
364					}
365				},
366				TopOSMFeatures: {
367					options: {
368						variant: 'toposm-features',
369						bounds: [[22, -132], [51, -56]],
370						opacity: 0.9
371					}
372				}
373			}
374		},
375		TomTom: {
376			url: 'https://{s}.api.tomtom.com/map/1/tile/{variant}/{style}/{z}/{x}/{y}.{ext}?key={apikey}',
377			options: {
378				variant: 'basic',
379				maxZoom: 22,
380				attribution:
381					'<a href="https://tomtom.com" target="_blank">&copy;  1992 - ' + new Date().getFullYear() + ' TomTom.</a> ',
382				subdomains: 'abcd',
383				style: 'main',
384				ext: 'png',
385				apikey: '<insert your API key here>',
386			},
387			variants: {
388				Basic: 'basic',
389				Hybrid: 'hybrid',
390				Labels: 'labels'
391			}
392		},
393		Esri: {
394			url: 'https://server.arcgisonline.com/ArcGIS/rest/services/{variant}/MapServer/tile/{z}/{y}/{x}',
395			options: {
396				variant: 'World_Street_Map',
397				attribution: 'Tiles &copy; Esri'
398			},
399			variants: {
400				WorldStreetMap: {
401					options: {
402						attribution:
403							'{attribution.Esri} &mdash; ' +
404							'Source: Esri, DeLorme, NAVTEQ, USGS, Intermap, iPC, NRCAN, Esri Japan, METI, Esri China (Hong Kong), Esri (Thailand), TomTom, 2012'
405					}
406				},
407				DeLorme: {
408					options: {
409						variant: 'Specialty/DeLorme_World_Base_Map',
410						minZoom: 1,
411						maxZoom: 11,
412						attribution: '{attribution.Esri} &mdash; Copyright: &copy;2012 DeLorme'
413					}
414				},
415				WorldTopoMap: {
416					options: {
417						variant: 'World_Topo_Map',
418						attribution:
419							'{attribution.Esri} &mdash; ' +
420							'Esri, DeLorme, NAVTEQ, TomTom, Intermap, iPC, USGS, FAO, NPS, NRCAN, GeoBase, Kadaster NL, Ordnance Survey, Esri Japan, METI, Esri China (Hong Kong), and the GIS User Community'
421					}
422				},
423				WorldImagery: {
424					options: {
425						variant: 'World_Imagery',
426						attribution:
427							'{attribution.Esri} &mdash; ' +
428							'Source: Esri, i-cubed, USDA, USGS, AEX, GeoEye, Getmapping, Aerogrid, IGN, IGP, UPR-EGP, and the GIS User Community'
429					}
430				},
431				WorldTerrain: {
432					options: {
433						variant: 'World_Terrain_Base',
434						maxZoom: 13,
435						attribution:
436							'{attribution.Esri} &mdash; ' +
437							'Source: USGS, Esri, TANA, DeLorme, and NPS'
438					}
439				},
440				WorldShadedRelief: {
441					options: {
442						variant: 'World_Shaded_Relief',
443						maxZoom: 13,
444						attribution: '{attribution.Esri} &mdash; Source: Esri'
445					}
446				},
447				WorldPhysical: {
448					options: {
449						variant: 'World_Physical_Map',
450						maxZoom: 8,
451						attribution: '{attribution.Esri} &mdash; Source: US National Park Service'
452					}
453				},
454				OceanBasemap: {
455					options: {
456						variant: 'Ocean_Basemap',
457						maxZoom: 13,
458						attribution: '{attribution.Esri} &mdash; Sources: GEBCO, NOAA, CHS, OSU, UNH, CSUMB, National Geographic, DeLorme, NAVTEQ, and Esri'
459					}
460				},
461				NatGeoWorldMap: {
462					options: {
463						variant: 'NatGeo_World_Map',
464						maxZoom: 16,
465						attribution: '{attribution.Esri} &mdash; National Geographic, Esri, DeLorme, NAVTEQ, UNEP-WCMC, USGS, NASA, ESA, METI, NRCAN, GEBCO, NOAA, iPC'
466					}
467				},
468				WorldGrayCanvas: {
469					options: {
470						variant: 'Canvas/World_Light_Gray_Base',
471						maxZoom: 16,
472						attribution: '{attribution.Esri} &mdash; Esri, DeLorme, NAVTEQ'
473					}
474				}
475			}
476		},
477		OpenWeatherMap: {
478			url: 'http://{s}.tile.openweathermap.org/map/{variant}/{z}/{x}/{y}.png?appid={apiKey}',
479			options: {
480				maxZoom: 19,
481				attribution: 'Map data &copy; <a href="http://openweathermap.org">OpenWeatherMap</a>',
482				apiKey: '<insert your api key here>',
483				opacity: 0.5
484			},
485			variants: {
486				Clouds: 'clouds',
487				CloudsClassic: 'clouds_cls',
488				Precipitation: 'precipitation',
489				PrecipitationClassic: 'precipitation_cls',
490				Rain: 'rain',
491				RainClassic: 'rain_cls',
492				Pressure: 'pressure',
493				PressureContour: 'pressure_cntr',
494				Wind: 'wind',
495				Temperature: 'temp',
496				Snow: 'snow'
497			}
498		},
499		HERE: {
500			/*
501			 * HERE maps, formerly Nokia maps.
502			 * These basemaps are free, but you need an api id and app key. Please sign up at
503			 * https://developer.here.com/plans
504			 */
505			url:
506				'https://{s}.{base}.maps.api.here.com/maptile/2.1/' +
507				'{type}/{mapID}/{variant}/{z}/{x}/{y}/{size}/{format}?' +
508				'app_id={app_id}&app_code={app_code}&lg={language}',
509			options: {
510				attribution:
511					'Map &copy; 1987-' + new Date().getFullYear() + ' <a href="http://developer.here.com">HERE</a>',
512				subdomains: '1234',
513				mapID: 'newest',
514				'app_id': '<insert your app_id here>',
515				'app_code': '<insert your app_code here>',
516				base: 'base',
517				variant: 'normal.day',
518				maxZoom: 20,
519				type: 'maptile',
520				language: 'eng',
521				format: 'png8',
522				size: '256'
523			},
524			variants: {
525				normalDay: 'normal.day',
526				normalDayCustom: 'normal.day.custom',
527				normalDayGrey: 'normal.day.grey',
528				normalDayMobile: 'normal.day.mobile',
529				normalDayGreyMobile: 'normal.day.grey.mobile',
530				normalDayTransit: 'normal.day.transit',
531				normalDayTransitMobile: 'normal.day.transit.mobile',
532				normalDayTraffic: {
533					options: {
534						variant: 'normal.traffic.day',
535						base: 'traffic',
536						type: 'traffictile'
537					}
538				},
539				normalNight: 'normal.night',
540				normalNightMobile: 'normal.night.mobile',
541				normalNightGrey: 'normal.night.grey',
542				normalNightGreyMobile: 'normal.night.grey.mobile',
543				normalNightTransit: 'normal.night.transit',
544				normalNightTransitMobile: 'normal.night.transit.mobile',
545				reducedDay: 'reduced.day',
546				reducedNight: 'reduced.night',
547				basicMap: {
548					options: {
549						type: 'basetile'
550					}
551				},
552				mapLabels: {
553					options: {
554						type: 'labeltile',
555						format: 'png'
556					}
557				},
558				trafficFlow: {
559					options: {
560						base: 'traffic',
561						type: 'flowtile'
562					}
563				},
564				carnavDayGrey: 'carnav.day.grey',
565				hybridDay: {
566					options: {
567						base: 'aerial',
568						variant: 'hybrid.day'
569					}
570				},
571				hybridDayMobile: {
572					options: {
573						base: 'aerial',
574						variant: 'hybrid.day.mobile'
575					}
576				},
577				hybridDayTransit: {
578					options: {
579						base: 'aerial',
580						variant: 'hybrid.day.transit'
581					}
582				},
583				hybridDayGrey: {
584					options: {
585						base: 'aerial',
586						variant: 'hybrid.grey.day'
587					}
588				},
589				hybridDayTraffic: {
590					options: {
591						variant: 'hybrid.traffic.day',
592						base: 'traffic',
593						type: 'traffictile'
594					}
595				},
596				pedestrianDay: 'pedestrian.day',
597				pedestrianNight: 'pedestrian.night',
598				satelliteDay: {
599					options: {
600						base: 'aerial',
601						variant: 'satellite.day'
602					}
603				},
604				terrainDay: {
605					options: {
606						base: 'aerial',
607						variant: 'terrain.day'
608					}
609				},
610				terrainDayMobile: {
611					options: {
612						base: 'aerial',
613						variant: 'terrain.day.mobile'
614					}
615				}
616			}
617		},
618		HEREv3: {
619			/*
620			 * HERE maps API Version 3.
621			 * These basemaps are free, but you need an API key. Please sign up at
622			 * https://developer.here.com/plans
623			 * Version 3 deprecates the app_id and app_code access in favor of apiKey
624			 *
625			 * Supported access methods as of 2019/12/21:
626			 * @see https://developer.here.com/faqs#access-control-1--how-do-you-control-access-to-here-location-services
627			 */
628			url:
629				'https://{s}.{base}.maps.ls.hereapi.com/maptile/2.1/' +
630				'{type}/{mapID}/{variant}/{z}/{x}/{y}/{size}/{format}?' +
631				'apiKey={apiKey}&lg={language}',
632			options: {
633				attribution:
634					'Map &copy; 1987-' + new Date().getFullYear() + ' <a href="http://developer.here.com">HERE</a>',
635				subdomains: '1234',
636				mapID: 'newest',
637				apiKey: '<insert your apiKey here>',
638				base: 'base',
639				variant: 'normal.day',
640				maxZoom: 20,
641				type: 'maptile',
642				language: 'eng',
643				format: 'png8',
644				size: '256'
645			},
646			variants: {
647				normalDay: 'normal.day',
648				normalDayCustom: 'normal.day.custom',
649				normalDayGrey: 'normal.day.grey',
650				normalDayMobile: 'normal.day.mobile',
651				normalDayGreyMobile: 'normal.day.grey.mobile',
652				normalDayTransit: 'normal.day.transit',
653				normalDayTransitMobile: 'normal.day.transit.mobile',
654				normalNight: 'normal.night',
655				normalNightMobile: 'normal.night.mobile',
656				normalNightGrey: 'normal.night.grey',
657				normalNightGreyMobile: 'normal.night.grey.mobile',
658				normalNightTransit: 'normal.night.transit',
659				normalNightTransitMobile: 'normal.night.transit.mobile',
660				reducedDay: 'reduced.day',
661				reducedNight: 'reduced.night',
662				basicMap: {
663					options: {
664						type: 'basetile'
665					}
666				},
667				mapLabels: {
668					options: {
669						type: 'labeltile',
670						format: 'png'
671					}
672				},
673				trafficFlow: {
674					options: {
675						base: 'traffic',
676						type: 'flowtile'
677					}
678				},
679				carnavDayGrey: 'carnav.day.grey',
680				hybridDay: {
681					options: {
682						base: 'aerial',
683						variant: 'hybrid.day'
684					}
685				},
686				hybridDayMobile: {
687					options: {
688						base: 'aerial',
689						variant: 'hybrid.day.mobile'
690					}
691				},
692				hybridDayTransit: {
693					options: {
694						base: 'aerial',
695						variant: 'hybrid.day.transit'
696					}
697				},
698				hybridDayGrey: {
699					options: {
700						base: 'aerial',
701						variant: 'hybrid.grey.day'
702					}
703				},
704				pedestrianDay: 'pedestrian.day',
705				pedestrianNight: 'pedestrian.night',
706				satelliteDay: {
707					options: {
708						base: 'aerial',
709						variant: 'satellite.day'
710					}
711				},
712				terrainDay: {
713					options: {
714						base: 'aerial',
715						variant: 'terrain.day'
716					}
717				},
718				terrainDayMobile: {
719					options: {
720						base: 'aerial',
721						variant: 'terrain.day.mobile'
722					}
723				}
724			}
725		},
726		FreeMapSK: {
727			url: 'https://{s}.freemap.sk/T/{z}/{x}/{y}.jpeg',
728			options: {
729				minZoom: 8,
730				maxZoom: 16,
731				subdomains: 'abcd',
732				bounds: [[47.204642, 15.996093], [49.830896, 22.576904]],
733				attribution:
734					'{attribution.OpenStreetMap}, vizualization CC-By-SA 2.0 <a href="http://freemap.sk">Freemap.sk</a>'
735			}
736		},
737		MtbMap: {
738			url: 'http://tile.mtbmap.cz/mtbmap_tiles/{z}/{x}/{y}.png',
739			options: {
740				attribution:
741					'{attribution.OpenStreetMap} &amp; USGS'
742			}
743		},
744		CartoDB: {
745			url: 'https://{s}.basemaps.cartocdn.com/{variant}/{z}/{x}/{y}{r}.png',
746			options: {
747				attribution: '{attribution.OpenStreetMap} &copy; <a href="https://carto.com/attributions">CARTO</a>',
748				subdomains: 'abcd',
749				maxZoom: 20,
750				variant: 'light_all'
751			},
752			variants: {
753				Positron: 'light_all',
754				PositronNoLabels: 'light_nolabels',
755				PositronOnlyLabels: 'light_only_labels',
756				DarkMatter: 'dark_all',
757				DarkMatterNoLabels: 'dark_nolabels',
758				DarkMatterOnlyLabels: 'dark_only_labels',
759				Voyager: 'rastertiles/voyager',
760				VoyagerNoLabels: 'rastertiles/voyager_nolabels',
761				VoyagerOnlyLabels: 'rastertiles/voyager_only_labels',
762				VoyagerLabelsUnder: 'rastertiles/voyager_labels_under'
763			}
764		},
765		HikeBike: {
766			url: 'https://tiles.wmflabs.org/{variant}/{z}/{x}/{y}.png',
767			options: {
768				maxZoom: 19,
769				attribution: '{attribution.OpenStreetMap}',
770				variant: 'hikebike'
771			},
772			variants: {
773				HikeBike: {},
774				HillShading: {
775					options: {
776						maxZoom: 15,
777						variant: 'hillshading'
778					}
779				}
780			}
781		},
782		BasemapAT: {
783			url: 'https://maps{s}.wien.gv.at/basemap/{variant}/{type}/google3857/{z}/{y}/{x}.{format}',
784			options: {
785				maxZoom: 19,
786				attribution: 'Datenquelle: <a href="https://www.basemap.at">basemap.at</a>',
787				subdomains: ['', '1', '2', '3', '4'],
788				type: 'normal',
789				format: 'png',
790				bounds: [[46.358770, 8.782379], [49.037872, 17.189532]],
791				variant: 'geolandbasemap'
792			},
793			variants: {
794				basemap: {
795					options: {
796						maxZoom: 20, // currently only in Vienna
797						variant: 'geolandbasemap'
798					}
799				},
800				grau: 'bmapgrau',
801				overlay: 'bmapoverlay',
802				terrain: {
803					options: {
804						variant: 'bmapgelaende',
805						type: 'grau',
806						format: 'jpeg'
807					}
808				},
809				surface: {
810					options: {
811						variant: 'bmapoberflaeche',
812						type: 'grau',
813						format: 'jpeg'
814					}
815				},
816				highdpi: {
817					options: {
818						variant: 'bmaphidpi',
819						format: 'jpeg'
820					}
821				},
822				orthofoto: {
823					options: {
824						maxZoom: 20, // currently only in Vienna
825						variant: 'bmaporthofoto30cm',
826						format: 'jpeg'
827					}
828				}
829			}
830		},
831		nlmaps: {
832			url: 'https://geodata.nationaalgeoregister.nl/tiles/service/wmts/{variant}/EPSG:3857/{z}/{x}/{y}.png',
833			options: {
834				minZoom: 6,
835				maxZoom: 19,
836				bounds: [[50.5, 3.25], [54, 7.6]],
837				attribution: 'Kaartgegevens &copy; <a href="https://www.kadaster.nl">Kadaster</a>'
838			},
839			variants: {
840				'standaard': 'brtachtergrondkaart',
841				'pastel': 'brtachtergrondkaartpastel',
842				'grijs': 'brtachtergrondkaartgrijs',
843				'luchtfoto': {
844					'url': 'https://service.pdok.nl/hwh/luchtfotorgb/wmts/v1_0/Actueel_ortho25/EPSG:3857/{z}/{x}/{y}.jpeg',
845				}
846			}
847		},
848		NASAGIBS: {
849			url: 'https://map1.vis.earthdata.nasa.gov/wmts-webmerc/{variant}/default/{time}/{tilematrixset}{maxZoom}/{z}/{y}/{x}.{format}',
850			options: {
851				attribution:
852					'Imagery provided by services from the Global Imagery Browse Services (GIBS), operated by the NASA/GSFC/Earth Science Data and Information System ' +
853					'(<a href="https://earthdata.nasa.gov">ESDIS</a>) with funding provided by NASA/HQ.',
854				bounds: [[-85.0511287776, -179.999999975], [85.0511287776, 179.999999975]],
855				minZoom: 1,
856				maxZoom: 9,
857				format: 'jpg',
858				time: '',
859				tilematrixset: 'GoogleMapsCompatible_Level'
860			},
861			variants: {
862				ModisTerraTrueColorCR: 'MODIS_Terra_CorrectedReflectance_True
862Color',
863				ModisTerraBands367CR: 'MODIS_Terra_CorrectedReflectance_Bands367',
864				ViirsEarthAtNight2012: {
865					options: {
866						variant: 'VIIRS_CityLights_2012',
867						maxZoom: 8
868					}
869				},
870				ModisTerraLSTDay: {
871					options: {
872						variant: 'MODIS_Terra_Land_Surface_Temp_Day',
873						format: 'png',
874						maxZoom: 7,
875						opacity: 0.75
876					}
877				},
878				ModisTerraSnowCover: {
879					options: {
880						variant: 'MODIS_Terra_NDSI_Snow_Cover',
881						format: 'png',
882						maxZoom: 8,
883						opacity: 0.75
884					}
885				},
886				ModisTerraAOD: {
887					options: {
888						variant: 'MODIS_Terra_Aerosol',
889						format: 'png',
890						maxZoom: 6,
891						opacity: 0.75
892					}
893				},
894				ModisTerraChlorophyll: {
895					options: {
896						variant: 'MODIS_Terra_Chlorophyll_A',
897						format: 'png',
898						maxZoom: 7,
899						opacity: 0.75
900					}
901				}
902			}
903		},
904		NLS: {
905			// NLS maps are copyright National library of Scotland.
906			// http://maps.nls.uk/projects/api/index.html
907			// Please contact NLS for anything other than non-commercial low volume usage
908			//
909			// Map sources: Ordnance Survey 1:1m to 1:63K, 1920s-1940s
910			//   z0-9  - 1:1m
911			//  z10-11 - quarter inch (1:253440)
912			//  z12-18 - one inch (1:63360)
913			url: 'https://nls-{s}.tileserver.com/nls/{z}/{x}/{y}.jpg',
914			options: {
915				attribution: '<a href="http://geo.nls.uk/maps/">National Library of Scotland Historic Maps</a>',
916				bounds: [[49.6, -12], [61.7, 3]],
917				minZoom: 1,
918				maxZoom: 18,
919				subdomains: '0123',
920			}
921		},
922		JusticeMap: {
923			// Justice Map (http://www.justicemap.org/)
924			// Visualize race and income data for your community, county and country.
925			// Includes tools for data journalists, bloggers and community activists.
926			url: 'https://www.justicemap.org/tile/{size}/{variant}/{z}/{x}/{y}.png',
927			options: {
928				attribution: '<a href="http://www.justicemap.org/terms.php">Justice Map</a>',
929				// one of 'county', 'tract', 'block'
930				size: 'county',
931				// Bounds for USA, including Alaska and Hawaii
932				bounds: [[14, -180], [72, -56]]
933			},
934			variants: {
935				income: 'income',
936				americanIndian: 'indian',
937				asian: 'asian',
938				black: 'black',
939				hispanic: 'hispanic',
940				multi: 'multi',
941				nonWhite: 'nonwhite',
942				white: 'white',
943				plurality: 'plural'
944			}
945		},
946		GeoportailFrance: {
947			url: 'https://wxs.ign.fr/{apikey}
947/geoportail/wmts?REQUEST=GetTile&SERVICE=WMTS&VERSION=1.0.0&STYLE={style}&TILEMATRIXSET=PM&FORMAT={format}&LAYER={variant}&TILEMATRIX={z}&TILEROW={y}&TILECOL={x}',
948			options: {
949				attribution: '<a target="_blank" href="https://www.geoportail.gouv.fr/">Geoportail France</a>',
950				bounds: [[-75, -180], [81, 180]],
951				minZoom: 2,
952				maxZoom: 18,
953				// Get your own geoportail apikey here : http://professionnels.ign.fr/ign/contrats/
954				// NB : 'choisirgeoportail' is a demonstration key that comes with no guarantee
955				apikey: 'choisirgeoportail',
956				format: 'image/png',
957				style: 'normal',
958				variant: 'GEOGRAPHICALGRIDSYSTEMS.PLANIGNV2'
959			},
960			variants: {
961				plan: 'GEOGRAPHICALGRIDSYSTEMS.PLANIGNV2',
962				parcels: {
963					options: {
964						variant: 'CADASTRALPARCELS.PARCELLAIRE_EXPRESS',
965						style: 'PCI vecteur',
966						maxZoom: 20
967					}
968				},
969				orthos: {
970					options: {
971						maxZoom: 19,
972						format: 'image/jpeg',
973						variant: 'ORTHOIMAGERY.ORTHOPHOTOS'
974					}
975				}
976			}
977		},
978		OneMapSG: {
979			url: 'https://maps-{s}.onemap.sg/v3/{variant}/{z}/{x}/{y}.png',
980			options: {
981				variant: 'Default',
982				minZoom: 11,
983				maxZoom: 18,
984				bounds: [[1.56073, 104.11475], [1.16, 103.502]],
985				attribution: '<img src="https://docs.onemap.sg/maps/images/oneMap64-01.png" style="height:20px;width:20px;"/> New OneMap | Map data &copy; contributors, <a href="http://SLA.gov.sg">Singapore Land Authority</a>'
986			},
987			variants: {
988				Default: 'Default',
989				Night: 'Night',
990				Original: 'Original',
991				Grey: 'Grey',
992				LandLot: 'LandLot'
993			}
994		},
995		USGS: {
996			url: 'https://basemap.nationalmap.gov/arcgis/rest/services/USGSTopo/M
996apServer/tile/{z}/{y}/{x}',
997			options: {
998				maxZoom: 20,
999				attribution: 'Tiles courtesy of the <a href="https://usgs.gov/">U.S. Geological Survey</a>'
1000			},
1001			variants: {
1002				USTopo: {},
1003				USImagery: {
1004					url: 'https://basemap.nationalmap.gov/arcgis/rest/services/USGSImageryOnly/MapServer/tile/{z}/{y}/{x}'
1005				},
1006				USImageryTopo: {
1007					url: 'https://basemap.nationalmap.gov/arcgis/rest/services/USGSImageryTopo/MapServer/tile/{z}/{y}/{x}'
1008				}
1009			}
1010		},
1011		WaymarkedTrails: {
1012			url: 'https://tile.waymarkedtrails.org/{variant}/{z}/{x}/{y}.png',
1013			options: {
1014				maxZoom: 18,
1015				attribution: 'Map data: {attribution.OpenStreetMap} | Map style: &copy; <a href="https://waymarkedtrails.org">waymarkedtrails.org</a> (<a href="https://creativecommons.org/licenses/by-sa/3.0/">CC-BY-SA</a>)'
1016			},
1017			variants: {
1018				hiking: 'hiking',
1019				cycling: 'cycling',
1020				mtb: 'mtb',
1021				slopes: 'slopes',
1022				riding: 'riding',
1023				skating: 'skating'
1024			}
1025		},
1026		OpenAIP: {
1027			url: 'https://{s}.tile.maps.openaip.net/geowebcache/service/tms/1.0.0/openaip_basemap@EPSG%3A900913@png/{z}/{x}/{y}.{ext}',
1028			options: {
1029				attribution: '<a href="https://www.openaip.net/">openAIP Data</a> (<a href="https://creativecommons.org/licenses/by-sa/3.0/">CC-BY-NC-SA</a>)',
1030				ext: 'png',
1031				minZoom: 4,
1032				maxZoom: 14,
1033				tms: true,
1034				detectRetina: true,
1035				subdomains: '12'
1036			}
1037		},
1038		OpenSnowMap: {
1039			url: 'https://tiles.opensnowmap.org/{variant}/{z}/{x}/{y}.png',
1040			options: {
1041				minZoom: 9,
1042				maxZoom: 18,
1043				attribution: 'Map data: {attribution.OpenStreetMap} & ODbL, &copy; <a href="https://www.opensnowmap.org/iframes/data.html">www.opensnowmap.org</a> <a href="https://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>'
1044			},
1045			variants: {
1046				pistes: 'pistes',
1047			}
1048		},
1049		AzureMaps: {
1050			url: 
1051				'https://atlas.microsoft.com/map/tile?api-version={apiVersion}'+
1052				'&tilesetId={variant}&x={x}&y={y}&zoom={z}&language={language}'+
1053				'&subscription-key={subscriptionKey}',
1054			options: {
1055				attribution: 'See https://docs.microsoft.com/en-US/rest/api/maps/renderv2/getmaptilepreview for details.',
1056				apiVersion: '2.0',
1057				variant: 'microsoft.imagery',
1058				subscriptionKey: '<insert your subscription key here>',
1059				language: 'en-US',
1060			},
1061			variants: {
1062				MicrosoftImagery: 'microsoft.imagery',
1063				MicrosoftBaseDarkGrey: 'microsoft.base.darkgrey',
1064				MicrosoftBaseRoad: 'microsoft.base.road',
1065				MicrosoftBaseHybridRoad: 'microsoft.base.hybrid.road',
1066				MicrosoftTerraMain: 'microsoft.terra.main',
1067				MicrosoftWeatherInfraredMain: {
1068					url: 
1069					'https://atlas.microsoft.com/map/tile?api-version={apiVersion}'+
1070					'&tilesetId={variant}&x={x}&y={y}&zoom={z}'+
1071					'&timeStamp={timeStamp}&language={language}' +
1072					'&subscription-key={subscriptionKey}',
1073					options: {
1074						timeStamp: '2021-05-08T09:03:00Z',
1075						attribution: 'See https://docs.microsoft.com/en-US/rest/api/maps/renderv2/getmaptilepreview#uri-parameters for details.',
1076						variant: 'microsoft.weather.infrared.main',
1077					},
1078				},
1079				MicrosoftWeatherRadarMain: {
1080					url: 
1081					'https://atlas.microsoft.com/map/tile?api-version={apiVersion}'+
1082					'&tilesetId={variant}&x={x}&y={y}&zoom={z}'+
1083					'&timeStamp={timeStamp}&language={language}' +
1084					'&subscription-key={subscriptionKey}',
1085					options: {
1086						timeStamp: '2021-05-08T09:03:00Z',
1087						attribution: 'See https://docs.microsoft.com/en-US/rest/api/maps/renderv2/getmaptilepreview#uri-parameters for details.',
1088						variant: 'microsoft.weather.radar.main',
1089					},
1090				}
1091			},
1092		}
1093	};
1094
1095	L.tileLayer.provider = function (provider, options) {
1096		return new L.TileLayer.Provider(provider, options);
1097	};
1098
1099	return L;
1100}));

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.