diff --git a/assets/leaflet-providers/README.md b/assets/leaflet-providers/README.md index 43abebd..792372b 100644 --- a/assets/leaflet-providers/README.md +++ b/assets/leaflet-providers/README.md @@ -10,6 +10,11 @@ Leaflet-providers [providers](#providers) are refered to with a `provider[.', + app_code: '' }).addTo(map); ``` +[Available HERE layers](http://leaflet-extras.github.io/leaflet-providers/preview/#filter=HERE) + ### Mapbox -In order to use Mapbox maps, you must [register](https://tiles.mapbox.com/signup). If your user name is `YourName` and your map is called `MyMap` you can add it with +In order to use Mapbox maps, you must [register](https://tiles.mapbox.com/signup). If your user name is `YourName` and your map is called `MyMap` you can add it with: ```JavaScript L.tileLayer.provider('MapBox.YourName.MyMap'); ``` ### Esri/ArcGIS -In order to use ArcGIS maps, you must [register](https://developers.arcgis.com/en/sign-up/) and abide by the [terms of service](https://developers.arcgis.com/en/terms/). Available layers are... +In order to use ArcGIS maps, you must [register](https://developers.arcgis.com/en/sign-up/) and abide by the [terms of service](https://developers.arcgis.com/en/terms/). No special syntax is required. -* Esri.WorldStreetMap -* Esri.DeLorme -* Esri.WorldTopoMap -* Esri.WorldImagery -* Esri.WorldTerrain -* Esri.WorldShadedRelief -* Esri.WorldPhysical -* Esri.OceanBasemap -* Esri.NatGeoWorldMap -* Esri.WorldGrayCanvas +[Available Esri layers](http://leaflet-extras.github.io/leaflet-providers/preview/#filter=Esri) # Attribution diff --git a/assets/leaflet-providers/bower.json b/assets/leaflet-providers/bower.json index 61797a2..3e8ff05 100644 --- a/assets/leaflet-providers/bower.json +++ b/assets/leaflet-providers/bower.json @@ -1,8 +1,11 @@ { "name": "leaflet-providers", - "version": "1.0.12", + "version": "1.1.0", "homepage": "https://github.com/leaflet-extras/leaflet-providers", "description": "An extension to Leaflet that contains configurations for various free tile providers.", + "dependencies": { + "leaflet": "~0.7.3" + }, "main": "leaflet-providers.js", "keywords": [ "leaflet", diff --git a/assets/leaflet-providers/leaflet-providers.js b/assets/leaflet-providers/leaflet-providers.js index 62f650a..9042429 100644 --- a/assets/leaflet-providers/leaflet-providers.js +++ b/assets/leaflet-providers/leaflet-providers.js @@ -1,4 +1,12 @@ -(function () { +(function (root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['leaflet'], factory); + } else { + // Assume leaflet is loaded into global object L already + factory(L); + } +}(this, function (L) { 'use strict'; L.TileLayer.Provider = L.TileLayer.extend({ @@ -41,6 +49,11 @@ provider.url = provider.url(parts.splice(1, parts.length - 1).join('.')); } + var forceHTTP = window.location.protocol === 'file:' || provider.options.forceHTTP; + if (provider.url.indexOf('//') === 0 && forceHTTP) { + provider.url = 'http:' + provider.url; + } + // replace attribution placeholders with their values from toplevel provider attribution, // recursively var attributionReplacer = function (attr) { @@ -66,21 +79,33 @@ * see http://leafletjs.com/reference.html#tilelayer for options in the options map. */ - //jshint maxlen:220 L.TileLayer.Provider.providers = { OpenStreetMap: { - url: 'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', + url: '//{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', options: { + maxZoom: 19, attribution: '© OpenStreetMap' }, variants: { Mapnik: {}, BlackAndWhite: { - url: 'http://{s}.tiles.wmflabs.org/bw-mapnik/{z}/{x}/{y}.png' + 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' + 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', @@ -96,8 +121,15 @@ attribution: 'Map data: © OpenSeaMap contributors' } }, + OpenTopoMap: { + url: '//{s}.tile.opentopomap.org/{z}/{x}/{y}.png', + options: { + maxZoom: 16, + attribution: 'Map data: {attribution.OpenStreetMap}, SRTM | Map style: © OpenTopoMap (CC-BY-SA)' + } + }, Thunderforest: { - url: 'http://{s}.tile.thunderforest.com/{variant}/{z}/{x}/{y}.png', + url: '//{s}.tile.thunderforest.com/{variant}/{z}/{x}/{y}.png', options: { attribution: '© OpenCycleMap, {attribution.OpenStreetMap}', @@ -105,7 +137,18 @@ }, variants: { OpenCycleMap: 'cycle', - Transport: 'transport', + Transport: { + options: { + variant: 'transport', + maxZoom: 19 + } + }, + TransportDark: { + options: { + variant: 'transport-dark', + maxZoom: 19 + } + }, Landscape: 'landscape', Outdoors: 'outdoors' } @@ -113,7 +156,6 @@ 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 GIScience Research Group @ University of Heidelberg — Map data {attribution.OpenStreetMap}' @@ -137,20 +179,24 @@ Hydda: { url: 'http://{s}.tile.openstreetmap.se/hydda/{variant}/{z}/{x}/{y}.png', options: { - minZoom: 0, - maxZoom: 18, variant: 'full', attribution: 'Tiles courtesy of OpenStreetMap Sweden — Map data {attribution.OpenStreetMap}' }, variants: { Full: 'full', Base: 'base', - RoadsAndLabels: 'roads_and_labels', + RoadsAndLabels: 'roads_and_labels' } }, MapQuestOpen: { - url: 'http://otile{s}.mqcdn.com/tiles/1.0.0/map/{z}/{x}/{y}.jpeg', + /* Mapquest does support https, but with a different subdomain: + * https://otile{s}-s.mqcdn.com/tiles/1.0.0/{type}/{z}/{x}/{y}.{ext} + * which makes implementing protocol relativity impossible. + */ + url: 'http://otile{s}.mqcdn.com/tiles/1.0.0/{type}/{z}/{x}/{y}.{ext}', options: { + type: 'map', + ext: 'jpg', attribution: 'Tiles Courtesy of MapQuest — ' + 'Map data {attribution.OpenStreetMap}', @@ -159,18 +205,25 @@ variants: { OSM: {}, Aerial: { - url: 'http://oatile{s}.mqcdn.com/tiles/1.0.0/sat/{z}/{x}/{y}.jpg', options: { + type: 'sat', attribution: 'Tiles Courtesy of MapQuest — ' + 'Portions Courtesy NASA/JPL-Caltech and U.S. Depart. of Agriculture, Farm Service Agency' } + }, + HybridOverlay: { + options: { + type: 'hyb', + ext: 'png', + opacity: 0.9 + } } } }, MapBox: { url: function (id) { - return 'http://{s}.tiles.mapbox.com/v3/' + id + '/{z}/{x}/{y}.png'; + return '//{s}.tiles.mapbox.com/v3/' + id + '/{z}/{x}/{y}.png'; }, options: { attribution: @@ -180,7 +233,7 @@ } }, Stamen: { - url: 'http://{s}.tile.stamen.com/{variant}/{z}/{x}/{y}.png', + url: '//stamen-tiles-{s}.a.ssl.fastly.net/{variant}/{z}/{x}/{y}.png', options: { attribution: 'Map tiles by Stamen Design, ' + @@ -189,7 +242,8 @@ subdomains: 'abcd', minZoom: 0, maxZoom: 20, - variant: 'toner' + variant: 'toner', + ext: 'png' }, variants: { Toner: 'toner', @@ -198,31 +252,47 @@ 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, maxZoom: 16 } + }, + Terrain: { + options: { + variant: 'terrain', + minZoom: 4, + maxZoom: 18, + bounds: [[22, -132], [70, -56]] + } + }, + TerrainBackground: { + options: { + variant: 'terrain-background', + minZoom: 4, + maxZoom: 18, + bounds: [[22, -132], [70, -56]] + } + }, + TopOSMRelief: { + options: { + variant: 'toposm-color-relief', + ext: 'jpg', + bounds: [[22, -132], [51, -56]] + } + }, + TopOSMFeatures: { + options: { + variant: 'toposm-features', + bounds: [[22, -132], [51, -56]], + opacity: 0.9 + } } } }, Esri: { - url: 'http://server.arcgisonline.com/ArcGIS/rest/services/{variant}/MapServer/tile/{z}/{y}/{x}', + url: '//server.arcgisonline.com/ArcGIS/rest/services/{variant}/MapServer/tile/{z}/{y}/{x}', options: { variant: 'World_Street_Map', attribution: 'Tiles © Esri' @@ -308,6 +378,7 @@ OpenWeatherMap: { url: 'http://{s}.tile.openweathermap.org/map/{variant}/{z}/{x}/{y}.png', options: { + maxZoom: 19, attribution: 'Map data © OpenWeatherMap', opacity: 0.5 }, @@ -336,7 +407,7 @@ * envirionments. */ url: - 'http://{s}.{base}.maps.cit.api.here.com/maptile/2.1/' + + '//{s}.{base}.maps.cit.api.here.com/maptile/2.1/' + 'maptile/{mapID}/{variant}/{z}/{x}/{y}/256/png8?' + 'app_id={app_id}&app_code={app_code}', options: { @@ -348,7 +419,6 @@ 'app_code': '', base: 'base', variant: 'normal.day', - minZoom: 0, maxZoom: 20 }, variants: { @@ -441,8 +511,7 @@ options: { attribution: '{attribution.OpenStreetMap} © CartoDB', subdomains: 'abcd', - minZoom: 0, - maxZoom: 18, + maxZoom: 19, variant: 'light_all' }, variants: { @@ -451,10 +520,113 @@ DarkMatter: 'dark_all', DarkMatterNoLabels: 'dark_nolabels' } + }, + HikeBike: { + url: 'http://{s}.tiles.wmflabs.org/{variant}/{z}/{x}/{y}.png', + options: { + maxZoom: 19, + attribution: '{attribution.OpenStreetMap}', + variant: 'hikebike' + }, + variants: { + HikeBike: {}, + HillShading: { + options: { + maxZoom: 15, + variant: 'hillshading' + } + } + } + }, + BasemapAT: { + url: '//maps{s}.wien.gv.at/basemap/{variant}/normal/google3857/{z}/{y}/{x}.{format}', + options: { + maxZoom: 19, + attribution: 'Datenquelle: basemap.at', + subdomains: ['', '1', '2', '3', '4'], + format: 'png', + bounds: [[46.358770, 8.782379], [49.037872, 17.189532]], + variant: 'geolandbasemap' + }, + variants: { + basemap: 'geolandbasemap', + grau: 'bmapgrau', + overlay: 'bmapoverlay', + highdpi: { + options: { + variant: 'bmaphidpi', + format: 'jpeg' + } + }, + orthofoto: { + options: { + variant: 'bmaporthofoto30cm', + format: 'jpeg' + } + } + } + }, + NASAGIBS: { + url: '//map1.vis.earthdata.nasa.gov/wmts-webmerc/{variant}/default/{time}/{tilematrixset}{maxZoom}/{z}/{y}/{x}.{format}', + options: { + attribution: + 'Imagery provided by services from the Global Imagery Browse Services (GIBS), operated by the NASA/GSFC/Earth Science Data and Information System ' + + '(ESDIS) with funding provided by NASA/HQ.', + bounds: [[-85.0511287776, -179.999999975], [85.0511287776, 179.999999975]], + minZoom: 1, + maxZoom: 9, + format: 'jpg', + time: '', + tilematrixset: 'GoogleMapsCompatible_Level' + }, + variants: { + ModisTerraTrueColorCR: 'MODIS_Terra_CorrectedReflectance_TrueColor', + ModisTerraBands367CR: 'MODIS_Terra_CorrectedReflectance_Bands367', + ViirsEarthAtNight2012: { + options: { + variant: 'VIIRS_CityLights_2012', + maxZoom: 8 + } + }, + ModisTerraLSTDay: { + options: { + variant: 'MODIS_Terra_Land_Surface_Temp_Day', + format: 'png', + maxZoom: 7, + opacity: 0.75 + } + }, + ModisTerraSnowCover: { + options: { + variant: 'MODIS_Terra_Snow_Cover', + format: 'png', + maxZoom: 8, + opacity: 0.75 + } + }, + ModisTerraAOD: { + options: { + variant: 'MODIS_Terra_Aerosol', + format: 'png', + maxZoom: 6, + opacity: 0.75 + } + }, + ModisTerraChlorophyll: { + options: { + variant: 'MODIS_Terra_Chlorophyll_A', + format: 'png', + maxZoom: 7, + opacity: 0.75 + } + } + } } }; L.tileLayer.provider = function (provider, options) { return new L.TileLayer.Provider(provider, options); }; -}()); + + return L; +})); diff --git a/assets/leaflet-providers/leaflet-providers.min.js b/assets/leaflet-providers/leaflet-providers.min.js index 3e7fa3b..a3360ed 100644 --- a/assets/leaflet-providers/leaflet-providers.min.js +++ b/assets/leaflet-providers/leaflet-providers.min.js @@ -1 +1 @@ -!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:'© OpenStreetMap'},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 Humanitarian OpenStreetMap Team'}}}},OpenSeaMap:{url:"http://tiles.openseamap.org/seamark/{z}/{x}/{y}.png",options:{attribution:'Map data: © OpenSeaMap contributors'}},Thunderforest:{url:"http://{s}.tile.thunderforest.com/{variant}/{z}/{x}/{y}.png",options:{attribution:'© OpenCycleMap, {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 GIScience Research Group @ University of Heidelberg — 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 OpenStreetMap Sweden — 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 MapQuest — 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 MapQuest — 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 MapBox — Map data {attribution.OpenStreetMap}',subdomains:"abcd"}},Stamen:{url:"http://{s}.tile.stamen.com/{variant}/{z}/{x}/{y}.png",options:{attribution:'Map tiles by Stamen Design, CC BY 3.0 — 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,maxZoom:16}}}},Esri:{url:"http://server.arcgisonline.com/ArcGIS/rest/services/{variant}/MapServer/tile/{z}/{y}/{x}",options:{variant:"World_Street_Map",attribution:"Tiles © Esri"},variants:{WorldStreetMap:{options:{attribution:"{attribution.Esri} — Source: Esri, DeLorme, NAVTEQ, USGS, Intermap, iPC, NRCAN, Esri Japan, METI, Esri China (Hong Kong), Esri (Thailand), TomTom, 2012"}},DeLorme:{options:{variant:"Specialty/DeLorme_World_Base_Map",minZoom:1,maxZoom:11,attribution:"{attribution.Esri} — Copyright: ©2012 DeLorme"}},WorldTopoMap:{options:{variant:"World_Topo_Map",attribution:"{attribution.Esri} — 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"}},WorldImagery:{options:{variant:"World_Imagery",attribution:"{attribution.Esri} — Source: Esri, i-cubed, USDA, USGS, AEX, GeoEye, Getmapping, Aerogrid, IGN, IGP, UPR-EGP, and the GIS User Community"}},WorldTerrain:{options:{variant:"World_Terrain_Base",maxZoom:13,attribution:"{attribution.Esri} — Source: USGS, Esri, TANA, DeLorme, and NPS"}},WorldShadedRelief:{options:{variant:"World_Shaded_Relief",maxZoom:13,attribution:"{attribution.Esri} — Source: Esri"}},WorldPhysical:{options:{variant:"World_Physical_Map",maxZoom:8,attribution:"{attribution.Esri} — Source: US National Park Service"}},OceanBasemap:{options:{variant:"Ocean_Basemap",maxZoom:13,attribution:"{attribution.Esri} — Sources: GEBCO, NOAA, CHS, OSU, UNH, CSUMB, National Geographic, DeLorme, NAVTEQ, and Esri"}},NatGeoWorldMap:{options:{variant:"NatGeo_World_Map",maxZoom:16,attribution:"{attribution.Esri} — National Geographic, Esri, DeLorme, NAVTEQ, UNEP-WCMC, USGS, NASA, ESA, METI, NRCAN, GEBCO, NOAA, iPC"}},WorldGrayCanvas:{options:{variant:"Canvas/World_Light_Gray_Base",maxZoom:16,attribution:"{attribution.Esri} — Esri, DeLorme, NAVTEQ"}}}},OpenWeatherMap:{url:"http://{s}.tile.openweathermap.org/map/{variant}/{z}/{x}/{y}.png",options:{attribution:'Map data © OpenWeatherMap',opacity:.5},variants:{Clouds:"clouds",CloudsClassic:"clouds_cls",Precipitation:"precipitation",PrecipitationClassic:"precipitation_cls",Rain:"rain",RainClassic:"rain_cls",Pressure:"pressure",PressureContour:"pressure_cntr",Wind:"wind",Temperature:"temp",Snow:"snow"}},HERE:{url:"http://{s}.{base}.maps.cit.api.here.com/maptile/2.1/maptile/{mapID}/{variant}/{z}/{x}/{y}/256/png8?app_id={app_id}&app_code={app_code}",options:{attribution:'Map © 1987-2014 HERE',subdomains:"1234",mapID:"newest",app_id:"",app_code:"",base:"base",variant:"normal.day",minZoom:0,maxZoom:20},variants:{normalDay:"normal.day",normalDayCustom:"normal.day.custom",normalDayGrey:"normal.day.grey",normalDayMobile:"normal.day.mobile",normalDayGreyMobile:"normal.day.grey.mobile",normalDayTransit:"normal.day.transit",normalDayTransitMobile:"normal.day.transit.mobile",normalNight:"normal.night",normalNightMobile:"normal.night.mobile",normalNightGrey:"normal.night.grey",normalNightGreyMobile:"normal.night.grey.mobile",carnavDayGrey:"carnav.day.grey",hybridDay:{options:{base:"aerial",variant:"hybrid.day"}},hybridDayMobile:{options:{base:"aerial",variant:"hybrid.day.mobile"}},pedestrianDay:"pedestrian.day",pedestrianNight:"pedestrian.night",satelliteDay:{options:{base:"aerial",variant:"satellite.day"}},terrainDay:{options:{base:"aerial",variant:"terrain.day"}},terrainDayMobile:{options:{base:"aerial",variant:"terrain.day.mobile"}}}},Acetate:{url:"http://a{s}.acetate.geoiq.com/tiles/{variant}/{z}/{x}/{y}.png",options:{attribution:"©2012 Esri & Stamen, Data from OSM and Natural Earth",subdomains:"0123",minZoom:2,maxZoom:18,variant:"acetate-base"},variants:{basemap:"acetate-base",terrain:"terrain",all:"acetate-hillshading",foreground:"acetate-fg",roads:"acetate-roads",labels:"acetate-labels",hillshading:"hillshading"}},FreeMapSK:{url:"http://{s}.freemap.sk/T/{z}/{x}/{y}.jpeg",options:{minZoom:8,maxZoom:16,subdomains:["t1","t2","t3","t4"],attribution:'{attribution.OpenStreetMap}, vizualization CC-By-SA 2.0 Freemap.sk'}},MtbMap:{url:"http://tile.mtbmap.cz/mtbmap_tiles/{z}/{x}/{y}.png",options:{attribution:"{attribution.OpenStreetMap} & USGS"}},CartoDB:{url:"http://{s}.basemaps.cartocdn.com/{variant}/{z}/{x}/{y}.png",options:{attribution:'{attribution.OpenStreetMap} © CartoDB',subdomains:"abcd",minZoom:0,maxZoom:18,variant:"light_all"},variants:{Positron:"light_all",PositronNoLabels:"light_nolabels",DarkMatter:"dark_all",DarkMatterNoLabels:"dark_nolabels"}}},L.tileLayer.provider=function(a,t){return new L.TileLayer.Provider(a,t)}}(); \ No newline at end of file +!function(a,t){"function"==typeof define&&define.amd?define(["leaflet"],t):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);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:'© OpenStreetMap'},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 Humanitarian OpenStreetMap Team'}}}},OpenSeaMap:{url:"http://tiles.openseamap.org/seamark/{z}/{x}/{y}.png",options:{attribution:'Map data: © OpenSeaMap contributors'}},OpenTopoMap:{url:"//{s}.tile.opentopomap.org/{z}/{x}/{y}.png",options:{maxZoom:16,attribution:'Map data: {attribution.OpenStreetMap}, SRTM | Map style: © OpenTopoMap (CC-BY-SA)'}},Thunderforest:{url:"//{s}.tile.thunderforest.com/{variant}/{z}/{x}/{y}.png",options:{attribution:'© OpenCycleMap, {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 GIScience Research Group @ University of Heidelberg — 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 OpenStreetMap Sweden — 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 MapQuest — Map data {attribution.OpenStreetMap}',subdomains:"1234"},variants:{OSM:{},Aerial:{options:{type:"sat",attribution:'Tiles Courtesy of MapQuest — Portions Courtesy NASA/JPL-Caltech and U.S. Depart. of Agriculture, Farm Service Agency'}},HybridOverlay:{options:{type:"hyb",ext:"png",opacity:.9}}}},MapBox:{url:function(a){return"//{s}.tiles.mapbox.com/v3/"+a+"/{z}/{x}/{y}.png"},options:{attribution:'Imagery from MapBox — Map data {attribution.OpenStreetMap}',subdomains:"abcd"}},Stamen:{url:"//stamen-tiles-{s}.a.ssl.fastly.net/{variant}/{z}/{x}/{y}.png",options:{attribution:'Map tiles by Stamen Design, CC BY 3.0 — Map data {attribution.OpenStreetMap}',subdomains:"abcd",minZoom:0,maxZoom:20,variant:"toner",ext:"png"},variants:{Toner:"toner",TonerBackground:"toner-background",TonerHybrid:"toner-hybrid",TonerLines:"toner-lines",TonerLabels:"toner-labels",TonerLite:"toner-lite",Watercolor:{options:{variant:"watercolor",minZoom:1,maxZoom:16}},Terrain:{options:{variant:"terrain",minZoom:4,maxZoom:18,bounds:[[22,-132],[70,-56]]}},TerrainBackground:{options:{variant:"terrain-background",minZoom:4,maxZoom:18,bounds:[[22,-132],[70,-56]]}},TopOSMRelief:{options:{variant:"toposm-color-relief",ext:"jpg",bounds:[[22,-132],[51,-56]]}},TopOSMFeatures:{options:{variant:"toposm-features",bounds:[[22,-132],[51,-56]],opacity:.9}}}},Esri:{url:"//server.arcgisonline.com/ArcGIS/rest/services/{variant}/MapServer/tile/{z}/{y}/{x}",options:{variant:"World_Street_Map",attribution:"Tiles © Esri"},variants:{WorldStreetMap:{options:{attribution:"{attribution.Esri} — Source: Esri, DeLorme, NAVTEQ, USGS, Intermap, iPC, NRCAN, Esri Japan, METI, Esri China (Hong Kong), Esri (Thailand), TomTom, 2012"}},DeLorme:{options:{variant:"Specialty/DeLorme_World_Base_Map",minZoom:1,maxZoom:11,attribution:"{attribution.Esri} — Copyright: ©2012 DeLorme"}},WorldTopoMap:{options:{variant:"World_Topo_Map",attribution:"{attribution.Esri} — 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"}},WorldImagery:{options:{variant:"World_Imagery",attribution:"{attribution.Esri} — Source: Esri, i-cubed, USDA, USGS, AEX, GeoEye, Getmapping, Aerogrid, IGN, IGP, UPR-EGP, and the GIS User Community"}},WorldTerrain:{options:{variant:"World_Terrain_Base",maxZoom:13,attribution:"{attribution.Esri} — Source: USGS, Esri, TANA, DeLorme, and NPS"}},WorldShadedRelief:{options:{variant:"World_Shaded_Relief",maxZoom:13,attribution:"{attribution.Esri} — Source: Esri"}},WorldPhysical:{options:{variant:"World_Physical_Map",maxZoom:8,attribution:"{attribution.Esri} — Source: US National Park Service"}},OceanBasemap:{options:{variant:"Ocean_Basemap",maxZoom:13,attribution:"{attribution.Esri} — Sources: GEBCO, NOAA, CHS, OSU, UNH, CSUMB, National Geographic, DeLorme, NAVTEQ, and Esri"}},NatGeoWorldMap:{options:{variant:"NatGeo_World_Map",maxZoom:16,attribution:"{attribution.Esri} — National Geographic, Esri, DeLorme, NAVTEQ, UNEP-WCMC, USGS, NASA, ESA, METI, NRCAN, GEBCO, NOAA, iPC"}},WorldGrayCanvas:{options:{variant:"Canvas/World_Light_Gray_Base",maxZoom:16,attribution:"{attribution.Esri} — Esri, DeLorme, NAVTEQ"}}}},OpenWeatherMap:{url:"http://{s}.tile.openweathermap.org/map/{variant}/{z}/{x}/{y}.png",options:{maxZoom:19,attribution:'Map data © OpenWeatherMap',opacity:.5},variants:{Clouds:"clouds",CloudsClassic:"clouds_cls",Precipitation:"precipitation",PrecipitationClassic:"precipitation_cls",Rain:"rain",RainClassic:"rain_cls",Pressure:"pressure",PressureContour:"pressure_cntr",Wind:"wind",Temperature:"temp",Snow:"snow"}},HERE:{url:"//{s}.{base}.maps.cit.api.here.com/maptile/2.1/maptile/{mapID}/{variant}/{z}/{x}/{y}/256/png8?app_id={app_id}&app_code={app_code}",options:{attribution:'Map © 1987-2014 HERE',subdomains:"1234",mapID:"newest",app_id:"",app_code:"",base:"base",variant:"normal.day",maxZoom:20},variants:{normalDay:"normal.day",normalDayCustom:"normal.day.custom",normalDayGrey:"normal.day.grey",normalDayMobile:"normal.day.mobile",normalDayGreyMobile:"normal.day.grey.mobile",normalDayTransit:"normal.day.transit",normalDayTransitMobile:"normal.day.transit.mobile",normalNight:"normal.night",normalNightMobile:"normal.night.mobile",normalNightGrey:"normal.night.grey",normalNightGreyMobile:"normal.night.grey.mobile",carnavDayGrey:"carnav.day.grey",hybridDay:{options:{base:"aerial",variant:"hybrid.day"}},hybridDayMobile:{options:{base:"aerial",variant:"hybrid.day.mobile"}},pedestrianDay:"pedestrian.day",pedestrianNight:"pedestrian.night",satelliteDay:{options:{base:"aerial",variant:"satellite.day"}},terrainDay:{options:{base:"aerial",variant:"terrain.day"}},terrainDayMobile:{options:{base:"aerial",variant:"terrain.day.mobile"}}}},Acetate:{url:"http://a{s}.acetate.geoiq.com/tiles/{variant}/{z}/{x}/{y}.png",options:{attribution:"©2012 Esri & Stamen, Data from OSM and Natural Earth",subdomains:"0123",minZoom:2,maxZoom:18,variant:"acetate-base"},variants:{basemap:"acetate-base",terrain:"terrain",all:"acetate-hillshading",foreground:"acetate-fg",roads:"acetate-roads",labels:"acetate-labels",hillshading:"hillshading"}},FreeMapSK:{url:"http://{s}.freemap.sk/T/{z}/{x}/{y}.jpeg",options:{minZoom:8,maxZoom:16,subdomains:["t1","t2","t3","t4"],attribution:'{attribution.OpenStreetMap}, vizualization CC-By-SA 2.0 Freemap.sk'}},MtbMap:{url:"http://tile.mtbmap.cz/mtbmap_tiles/{z}/{x}/{y}.png",options:{attribution:"{attribution.OpenStreetMap} & USGS"}},CartoDB:{url:"http://{s}.basemaps.cartocdn.com/{variant}/{z}/{x}/{y}.png",options:{attribution:'{attribution.OpenStreetMap} © CartoDB',subdomains:"abcd",maxZoom:19,variant:"light_all"},variants:{Positron:"light_all",PositronNoLabels:"light_nolabels",DarkMatter:"dark_all",DarkMatterNoLabels:"dark_nolabels"}},HikeBike:{url:"http://{s}.tiles.wmflabs.org/{variant}/{z}/{x}/{y}.png",options:{maxZoom:19,attribution:"{attribution.OpenStreetMap}",variant:"hikebike"},variants:{HikeBike:{},HillShading:{options:{maxZoom:15,variant:"hillshading"}}}},BasemapAT:{url:"//maps{s}.wien.gv.at/basemap/{variant}/normal/google3857/{z}/{y}/{x}.{format}",options:{maxZoom:19,attribution:'Datenquelle: basemap.at',subdomains:["","1","2","3","4"],format:"png",bounds:[[46.35877,8.782379],[49.037872,17.189532]],variant:"geolandbasemap"},variants:{basemap:"geolandbasemap",grau:"bmapgrau",overlay:"bmapoverlay",highdpi:{options:{variant:"bmaphidpi",format:"jpeg"}},orthofoto:{options:{variant:"bmaporthofoto30cm",format:"jpeg"}}}},NASAGIBS:{url:"//map1.vis.earthdata.nasa.gov/wmts-webmerc/{variant}/default/{time}/{tilematrixset}{maxZoom}/{z}/{y}/{x}.{format}",options:{attribution:'Imagery provided by services from the Global Imagery Browse Services (GIBS), operated by the NASA/GSFC/Earth Science Data and Information System (ESDIS) with funding provided by NASA/HQ.',bounds:[[-85.0511287776,-179.999999975],[85.0511287776,179.999999975]],minZoom:1,maxZoom:9,format:"jpg",time:"",tilematrixset:"GoogleMapsCompatible_Level"},variants:{ModisTerraTrueColorCR:"MODIS_Terra_CorrectedReflectance_TrueColor",ModisTerraBands367CR:"MODIS_Terra_CorrectedReflectance_Bands367",ViirsEarthAtNight2012:{options:{variant:"VIIRS_CityLights_2012",maxZoom:8}},ModisTerraLSTDay:{options:{variant:"MODIS_Terra_Land_Surface_Temp_Day",format:"png",maxZoom:7,opacity:.75}},ModisTerraSnowCover:{options:{variant:"MODIS_Terra_Snow_Cover",format:"png",maxZoom:8,opacity:.75}},ModisTerraAOD:{options:{variant:"MODIS_Terra_Aerosol",format:"png",maxZoom:6,opacity:.75}},ModisTerraChlorophyll:{options:{variant:"MODIS_Terra_Chlorophyll_A",format:"png",maxZoom:7,opacity:.75}}}}},a.tileLayer.provider=function(t,o){return new a.TileLayer.Provider(t,o)},a}); \ No newline at end of file diff --git a/assets/leaflet-providers/package.json b/assets/leaflet-providers/package.json index a42488b..afa8d9b 100644 --- a/assets/leaflet-providers/package.json +++ b/assets/leaflet-providers/package.json @@ -1,6 +1,6 @@ { "name": "leaflet-providers", - "version": "1.0.12", + "version": "1.1.0", "description": "An extension to Leaflet that contains configurations for various free tile providers.", "main": "leaflet-providers.js", "repository": { @@ -8,7 +8,9 @@ "url": "git://github.com/leaflet-extras/leaflet-providers.git" }, "scripts": { - "test": "jshint leaflet-providers.js preview/*.js", + "test": "npm run lint && npm run testsuite", + "testsuite": "mocha-phantomjs tests/index.html", + "lint": "eslint --config .eslintrc leaflet-providers.js preview/preview.js preview/shared.js preview/https-support.js tests/test.js", "min": "uglifyjs leaflet-providers.js -mc -o leaflet-providers.min.js", "release": "mversion patch -m" }, @@ -17,8 +19,20 @@ "url": "https://github.com/leaflet-extras/leaflet-providers/issues" }, "devDependencies": { - "jshint": "~2.1.11", + "chai": "^2.3.0", + "eslint": "^0.15.0", + "mocha": "^2.2.4", + "mocha-phantomjs": "^3.5.3", "mversion": "^1.3.0", - "uglify-js": "^2.4.15" + "uglify-js": "^2.4.15", + "phantomjs": "^1.9.16" + }, + "autoupdate": { + "source": "git", + "target": "git://github.com/leaflet-extras/leaflet-providers.git", + "basePath": "/", + "files": [ + "leaflet-providers.js" + ] } } diff --git a/module/config/config.php b/module/config/config.php index e6a84cf..fbbb545 100644 --- a/module/config/config.php +++ b/module/config/config.php @@ -27,7 +27,7 @@ $GLOBALS['LEAFLET_LIBRARIES']['leaflet'] = array $GLOBALS['LEAFLET_LIBRARIES']['leaflet-providers'] = array ( 'name' => 'Leaflet-providers', - 'version' => '1.0.12', + 'version' => '1.1.0', 'license' => 'BSD-2-Clause', 'homepage' => 'http://leaflet-extras.github.io/leaflet-providers', 'javascript' => 'assets/leaflet/libs/leaflet-providers/leaflet-providers.min.js'