Files
contao-leaflet-libraries/assets/leaflet-providers/leaflet-providers.min.js

1 line
15 KiB
JavaScript
Raw Normal View History

2018-08-23 15:35:24 +02:00
!function(a,t){"function"==typeof define&&define.amd?define(["leaflet"],t):"object"==typeof modules&&module.exports?module.exports=t(require("leaflet")):t(L)}(0,function(a){"use strict";return a.TileLayer.Provider=a.TileLayer.extend({initialize:function(t,o){var e=a.TileLayer.Provider.providers,r=t.split("."),i=r[0],n=r[1];if(!e[i])throw"No such provider ("+i+")";var s={url:e[i].url,options:e[i].options};if(n&&"variants"in e[i]){if(!(n in e[i].variants))throw"No such variant of "+i+" ("+n+")";var p,l=e[i].variants[n];p="string"==typeof l?{variant:l}:l.options,s={url:l.url||s.url,options:a.Util.extend({},s.options,p)}}var m=function(a){return-1===a.indexOf("{attribution.")?a:a.replace(/\{attribution.(\w*)\}/,function(a,t){return m(e[t].options.attribution)})};s.options.attribution=m(s.options.attribution);var u=a.Util.extend({},s.options,o);a.TileLayer.prototype.initialize.call(this,s.url,u)}}),a.TileLayer.Provider.providers={OpenStreetMap:{url:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",options:{maxZoom:19,attribution:'&copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>'},variants:{Mapnik:{},BlackAndWhite:{url:"http://{s}.tiles.wmflabs.org/bw-mapnik/{z}/{x}/{y}.png",options:{maxZoom:18}},DE:{url:"https://{s}.tile.openstreetmap.de/tiles/osmde/{z}/{x}/{y}.png",options:{maxZoom:18}},CH:{url:"https://tile.osm.ch/switzerland/{z}/{x}/{y}.png",options:{maxZoom:18,bounds:[[45,5],[48,11]]}},France:{url:"https://{s}.tile.openstreetmap.fr/osmfr/{z}/{x}/{y}.png",options:{maxZoom:20,attribution:"&copy; Openstreetmap France | {attribution.OpenStreetMap}"}},HOT:{url:"https://{s}.tile.openstreetmap.fr/hot/{z}/{x}/{y}.png",options:{attribution:'{attribution.OpenStreetMap}, Tiles courtesy of <a href="http://hot.openstreetmap.org/" target="_blank">Humanitarian OpenStreetMap Team</a>'}},BZH:{url:"https://tile.openstreetmap.bzh/br/{z}/{x}/{y}.png",options:{attribution:'{attribution.OpenStreetMap}, Tiles courtesy of <a href="http://www.openstreetmap.bzh/" target="_blank">Breton OpenStreetMap Team</a>',bounds:[[46.2,-5.5],[50,.7]]}}}},OpenInfraMap:{url:"https://tiles-{s}.openinframap.org/{variant}/{z}/{x}/{y}.png",options:{maxZoom:18,attribution:'{attribution.OpenStreetMap}, <a href="http://www.openinframap.org/about.html">About OpenInfraMap</a>'},variants:{Power:"power",Telecom:"telecoms",Petroleum:"petroleum",Water:"water"}},OpenSeaMap:{url:"https://tiles.openseamap.org/seamark/{z}/{x}/{y}.png",options:{attribution:'Map data: &copy; <a href="http://www.openseamap.org">OpenSeaMap</a> contributors'}},OpenPtMap:{url:"http://openptmap.org/tiles/{z}/{x}/{y}.png",options:{maxZoom:17,attribution:'Map data: &copy; <a href="http://www.openptmap.org">OpenPtMap</a> contributors'}},OpenTopoMap:{url:"https://{s}.tile.opentopomap.org/{z}/{x}/{y}.png",options:{maxZoom:17,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>)'}},OpenRailwayMap:{url:"https://{s}.tiles.openrailwaymap.org/standard/{z}/{x}/{y}.png",options:{maxZoom:19,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>)'}},OpenFireMap:{url:"http://openfiremap.org/hytiles/{z}/{x}/{y}.png",options:{maxZoom:19,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>)'}},SafeCast:{url:"https://s3.amazonaws.com/te512.safecast.org/{z}/{x}/{y}.png",options:{maxZoom:16,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>)'}},Thunderforest:{url:"https://{s}.tile.thunderforest.com/{variant}/{z}/{x}/{y}.png?apikey={apikey}",options:{attribution:'&copy; <a href