2015-10-30 23:40:15 +01: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)}}else"function"==typeof s.url&&(s.url=s.url(e.splice(1,e.length-1).join(".")));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-1===a.indexOf("{attribution.")?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:"http://{s}.tile.openstreetmap.fr/osmfr/{z}/{x}/{y}.png",options:{attribution:"© Openstreetmap France | {attribution.OpenStreetMap}"}},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'}},OpenTopoMap:{url:"//{s}.tile.opentopomap.org/{z}/{x}/{y}.png",options:{maxZoom:16,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.opencyclemap.org">OpenCycleMap</a>, {attribution.OpenStreetMap}',variant:"cycle"},variants:{OpenCycleMap:"cycle",Transport:{options:{variant:"transport",maxZoom:19}},TransportDark:{options:{variant:"transport-dark",maxZoom:19}},Landscape:"landscape",Outdoors:"outdoors"}},OpenMapSurfer:{url:"http://openmapsurfer.uni-hd.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:"http://{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"}},MapQuestOpen:{url:"http://otile{s}.mqcdn.com/tiles/1.0.0/{type}/{z}/{x}/{y}.{ext}",options:{type:"map",ext:"jpg",attribution:'Tiles Courtesy of <a href="http://www.mapquest.com/">MapQuest</a> — Map data {attribution.OpenStreetMap}',subdomains:"1234"},variants:{OSM:{},Aerial:{options:{type:"sat",attribution:'Tiles Courtesy of <a href="http://www.mapquest.com/">MapQuest</a> — Portions Courtesy NASA/JPL-Caltech and U.S. Depart. of Agriculture, F
|