mirror of
https://github.com/netzmacht/contao-leaflet-libraries.git
synced 2025-12-02 04:53:55 +01:00
1 line
8.8 KiB
JavaScript
1 line
8.8 KiB
JavaScript
|
|
!function(){"use strict";L.TileLayer.Provider=L.TileLayer.extend({initialize:function(a,t){var r=L.TileLayer.Provider.providers,o=a.split("."),e=o[0],i=o[1];if(!r[e])throw"No such provider ("+e+")";var n={url:r[e].url,options:r[e].options};if(i&&"variants"in r[e]){if(!(i in r[e].variants))throw"No such variant of "+e+" ("+i+")";var s,p=r[e].variants[i];s="string"==typeof p?{variant:p}:p.options,n={url:p.url||n.url,options:L.Util.extend({},n.options,s)}}else"function"==typeof n.url&&(n.url=n.url(o.splice(1,o.length-1).join(".")));var l=function(a){return-1===a.indexOf("{attribution.")?a:a.replace(/\{attribution.(\w*)\}/,function(a,t){return l(r[t].options.attribution)})};n.options.attribution=l(n.options.attribution);var m=L.Util.extend({},n.options,t);L.TileLayer.prototype.initialize.call(this,n.url,m)}}),L.TileLayer.Provider.providers={OpenStreetMap:{url:"http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",options:{attribution:'© <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>'},variants:{Mapnik:{},BlackAndWhite:{url:"http://{s}.tiles.wmflabs.org/bw-mapnik/{z}/{x}/{y}.png"},DE:{url:"http://{s}.tile.openstreetmap.de/tiles/osmde/{z}/{x}/{y}.png"},HOT:{url:"http://{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>'}}}},OpenSeaMap:{url:"http://tiles.openseamap.org/seamark/{z}/{x}/{y}.png",options:{attribution:'Map data: © <a href="http://www.openseamap.org">OpenSeaMap</a> contributors'}},Thunderforest:{url:"http://{s}.tile.thunderforest.com/{variant}/{z}/{x}/{y}.png",options:{attribution:'© <a href="http://www.opencyclemap.org">OpenCycleMap</a>, {attribution.OpenStreetMap}',variant:"cycle"},variants:{OpenCycleMap:"cycle",Transport:"transport",Landscape:"landscape",Outdoors:"outdoors"}},OpenMapSurfer:{url:"http://openmapsurfer.uni-hd.de/tiles/{variant}/x={x}&y={y}&z={z}",options:{minZoom:0,maxZoom:20,variant:"roads",attribution:'Imagery from <a href="http://giscience.uni-hd.de/">GIScience Research Group @ University of Heidelberg</a> — Map data {attribution.OpenStreetMap}'},variants:{Roads:"roads",AdminBounds:{options:{variant:"adminb",maxZoom:19}},Grayscale:{options:{variant:"roadsg",maxZoom:19}}}},Hydda:{url:"http://{s}.tile.openstreetmap.se/hydda/{variant}/{z}/{x}/{y}.png",options:{minZoom:0,maxZoom:18,variant:"full",attribution:'Tiles courtesy of <a href="http://openstreetmap.se/" target="_blank">OpenStreetMap Sweden</a> — Map data {attribution.OpenStreetMap}'},variants:{Full:"full",Base:"base",RoadsAndLabels:"roads_and_labels"}},MapQuestOpen:{url:"http://otile{s}.mqcdn.com/tiles/1.0.0/map/{z}/{x}/{y}.jpeg",options:{attribution:'Tiles Courtesy of <a href="http://www.mapquest.com/">MapQuest</a> — Map data {attribution.OpenStreetMap}',subdomains:"1234"},variants:{OSM:{},Aerial:{url:"http://oatile{s}.mqcdn.com/tiles/1.0.0/sat/{z}/{x}/{y}.jpg",options:{attribution:'Tiles Courtesy of <a href="http://www.mapquest.com/">MapQuest</a> — Portions Courtesy NASA/JPL-Caltech and U.S. Depart. of Agriculture, Farm Service Agency'}}}},MapBox:{url:function(a){return"http://{s}.tiles.mapbox.com/v3/"+a+"/{z}/{x}/{y}.png"},options:{attribution:'Imagery from <a href="http://mapbox.com/about/maps/">MapBox</a> — Map data {attribution.OpenStreetMap}',subdomains:"abcd"}},Stamen:{url:"http://{s}.tile.stamen.com/{variant}/{z}/{x}/{y}.png",options:{attribution:'Map tiles by <a href="http://stamen.com">Stamen Design</a>, <a href="http://creativecommons.org/licenses/by/3.0">CC BY 3.0</a> — Map data {attribution.OpenStreetMap}',subdomains:"abcd",minZoom:0,maxZoom:20,variant:"toner"},variants:{Toner:"toner",TonerBackground:"toner-background",TonerHybrid:"toner-hybrid",TonerLines:"toner-lines",TonerLabels:"toner-labels",TonerLite:"toner-lite",Terrain:{options:{variant:"terrain",minZoom:4,maxZoom:18}},TerrainBackground:{options:{variant:"terrain-background",minZoom:4,maxZoom:18}},Watercolor:{options:{variant:"watercolor",minZoom:1,
|