2016-10-04 13:43:39 +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)}(this,function(a){"use strict";return a.TileLayer.Provider=a.TileLayer.extend({initialize:function(t,o){var r=a.TileLayer.Provider.providers,e=t.split("."),i=e[0],n=e[1];if(!r[i])throw"No such provider ("+i+")";var s={url:r[i].url,options:r[i].options};if(n&&"variants"in r[i]){if(!(n in r[i].variants))throw"No such variant of "+i+" ("+n+")";var p,m=r[i].variants[n];p="string"==typeof m?{variant:m}:m.options,s={url:m.url||s.url,options:a.Util.extend({},s.options,p)}}var l="file:"===window.location.protocol||s.options.forceHTTP;0===s.url.indexOf("//")&&l&&(s.url="http:"+s.url),s.options.retina&&(o.detectRetina&&a.Browser.retina?o.detectRetina=!1:s.options.retina="");var d=function(a){return a.indexOf("{attribution.")===-1?a:a.replace(/\{attribution.(\w*)\}/,function(a,t){return d(r[t].options.attribution)})};s.options.attribution=d(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:"//{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",options:{maxZoom:19,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",options:{maxZoom:18}},DE:{url:"http://{s}.tile.openstreetmap.de/tiles/osmde/{z}/{x}/{y}.png",options:{maxZoom:18}},France:{url:"//{s}.tile.openstreetmap.fr/osmfr/{z}/{x}/{y}.png",options:{maxZoom:20,attribution:"© Openstreetmap France | {attribution.OpenStreetMap}"}},HOT:{url:"//{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'}},OpenTopoMap:{url:"//{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: © <a href="https://opentopomap.org">OpenTopoMap</a> (<a href="https://creativecommons.org/licenses/by-sa/3.0/">CC-BY-SA</a>)'}},Thunderforest:{url:"//{s}.tile.thunderforest.com/{variant}/{z}/{x}/{y}.png",options:{attribution:'© <a href="http://www.thunderforest.com/">Thunderforest</a>, {attribution.OpenStreetMap}',variant:"cycle"},variants:{OpenCycleMap:"cycle",Transport:{options:{variant:"transport",maxZoom:19}},TransportDark:{options:{variant:"transport-dark",maxZoom:19}},SpinalMap:{options:{variant:"spinal-map",maxZoom:11}},Landscape:"landscape",Outdoors:"outdoors",Pioneer:"pioneer"}},OpenMapSurfer:{url:"http://korona.geog.uni-heidelberg.de/tiles/{variant}/x={x}&y={y}&z={z}",options:{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:"//{s}.tile.openstreetmap.se/hydda/{variant}/{z}/{x}/{y}.png",options:{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"}},MapBox:{url:"//api.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token={accessToken}",options:{attribution:'Imagery from <a href="http://mapbox.com/about/maps/">MapBox</a> — Map data {attribution.OpenStreetMap}',subdomains:"abcd"}},Stamen:{url:"//stamen-tiles-{s}.a.ssl.fastly.net/{variant}/{z}/{x}/{y}.{ext}",options:{attribution:'Map tiles by <a href="http://stamen.com">Stamen Design</a>, <a href="http://creativecommons.org/licenses/by/3.0">CC BY
|