diff options
author | luxagraf <sng@luxagraf.net> | 2014-07-02 17:35:39 +0000 |
---|---|---|
committer | luxagraf <sng@luxagraf.net> | 2014-07-02 17:35:39 +0000 |
commit | a71902d62b6313dde8357c47ea2af4c3caba69bd (patch) | |
tree | 988b32632641c716bdcf0d97590c11951c3e33d9 /site/media/js/photos.min.js | |
parent | cc9695f4c4c14d61c32611dba4ec88c98c6ce460 (diff) |
bugfixes after launch
Diffstat (limited to 'site/media/js/photos.min.js')
-rw-r--r-- | site/media/js/photos.min.js | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/site/media/js/photos.min.js b/site/media/js/photos.min.js index c0fbfdf..f2e866e 100644 --- a/site/media/js/photos.min.js +++ b/site/media/js/photos.min.js @@ -1 +1,19 @@ -b'(function () {\n\t\'use strict\';\n\n\tL.TileLayer.Provider = L.TileLayer.extend({\n\t\tinitialize: function (arg, options) {\n\t\t\tvar providers = L.TileLayer.Provider.providers;\n\n\t\t\tvar parts = arg.split(\'.\');\n\n\t\t\tvar providerName = parts[0];\n\t\t\tvar variantName = parts[1];\n\n\t\t\tif (!providers[providerName]) {\n\t\t\t\tthrow \'No such provider (\' + providerName + \')\';\n\t\t\t}\n\n\t\t\tvar provider = {\n\t\t\t\turl: providers[providerName].url,\n\t\t\t\toptions: providers[providerName].options\n\t\t\t};\n\n\t\t\t// overwrite values in provider from variant.\n\t\t\tif (variantName && \'variants\' in providers[providerName]) {\n\t\t\t\tif (!(variantName in providers[providerName].variants)) {\n\t\t\t\t\tthrow \'No such variant of \' + providerName + \' (\' + variantName + \')\';\n\t\t\t\t}\n\t\t\t\tvar variant = providers[providerName].variants[variantName];\n\t\t\t\tvar variantOptions;\n\t\t\t\tif (typeof variant === \'string\') {\n\t\t\t\t\tvariantOptions = {\n\t\t\t\t\t\tvariant: variant\n\t\t\t\t\t};\n\t\t\t\t} else {\n\t\t\t\t\tvariantOptions = variant.options;\n\t\t\t\t}\n\t\t\t\tprovider = {\n\t\t\t\t\turl: variant.url || provider.url,\n\t\t\t\t\toptions: L.Util.extend({}, provider.options, variantOptions)\n\t\t\t\t};\n\t\t\t} else if (typeof provider.url === \'function\') {\n\t\t\t\tprovider.url = provider.url(parts.splice(1, parts.length - 1).join(\'.\'));\n\t\t\t}\n\n\t\t\t// replace attribution placeholders with their values from toplevel provider attribution,\n\t\t\t// recursively\n\t\t\tvar attributionReplacer = function (attr) {\n\t\t\t\tif (attr.indexOf(\'{attribution.\') === -1) {\n\t\t\t\t\treturn attr;\n\t\t\t\t}\n\t\t\t\treturn attr.replace(/\\{attribution.(\\w*)\\}/,\n\t\t\t\t\tfunction (match, attributionName) {\n\t\t\t\t\t\treturn attributionReplacer(providers[attributionName].options.attribution);\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t};\n\t\t\tprovider.options.attribution = attributionReplacer(provider.options.attribution);\n\n\t\t\t// Compute final options combining provider options with any user overrides\n\t\t\tvar layerOpts = L.Util.extend({}, provider.options, options);\n\t\t\tL.TileLayer.prototype.initialize.call(this, provider.url, layerOpts);\n\t\t}\n\t});\n\n\t/**\n\t * Definition of providers.\n\t * see http://leafletjs.com/reference.html#tilelayer for options in the options map.\n\t */\n\n\t//jshint maxlen:220\n\tL.TileLayer.Provider.providers = {\n\t\tOpenStreetMap: {\n\t\t\turl: \'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png\',\n\t\t\toptions: {\n\t\t\t\tattribution:\n\t\t\t\t\t\'© <a href="http://openstreetmap.org">OpenStreetMap</a> contributors, \' +\n\t\t\t\t\t\'<a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>\'\n\t\t\t},\n\t\t\tvariants: {\n\t\t\t\tMapnik: {},\n\t\t\t\tBlackAndWhite: {\n\t\t\t\t\turl: \'http://{s}.www.toolserver.org/tiles/bw-mapnik/{z}/{x}/{y}.png\'\n\t\t\t\t},\n\t\t\t\tDE: {\n\t\t\t\t\turl: \'http://{s}.tile.openstreetmap.de/tiles/osmde/{z}/{x}/{y}.png\'\n\t\t\t\t},\n\t\t\t\tHOT: {\n\t\t\t\t\turl: \'http://{s}.tile.openstreetmap.fr/hot/{z}/{x}/{y}.png\',\n\t\t\t\t\toptions: {\n\t\t\t\t\t\tattribution: \'{attribution.OpenStreetMap}, Tiles courtesy of <a href="http://hot.openstreetmap.org/" target="_blank">Humanitarian OpenStreetMap Team</a>\'\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tOpenSeaMap: {\n\t\t\turl: \'http://tiles.openseamap.org/seamark/{z}/{x}/{y}.png\',\n\t\t\toptions: {\n\t\t\t\tattribution: \'Map data: © <a href="http://www.openseamap.org">OpenSeaMap</a> contributors\'\n\t\t\t}\n\t\t},\n\t\tThunderforest: {\n\t\t\turl: \'http://{s}.tile.thunderforest.com/{variant}/{z}/{x}/{y}.png\',\n\t\t\toptions: {\n\t\t\t\tattribution:\n\t\t\t\t\t\'© <a href="http://www.opencyclemap.org">OpenCycleMap</a>, {attribution.OpenStreetMap}\',\n\t\t\t\tvariant: \'cycle\'\n\t\t\t},\n\t\t\tvariants: {\n\t\t\t\tOpenCycleMap: \'cycle\',\n\t\t\t\tTransport: \'transport\',\n\t\t\t\tLandscape: \'landscape\',\n\t\t\t\tOutdoors: \'outdoors\'\n\t\t\t}\n\t\t},\n\t\tOpenMapSurfer: {\n\t\t\turl: \'http://openmapsurfer.uni-hd.de/tiles/{variant}/x={x}&y={y}&z={z}\',\n\t\t\toptions: {\n\t\t\t\tminZoom: 0,\n\t\t\t\tmaxZoom: 20,\n\t\t\t\tvariant: \'roads\',\n\t\t\t\tattribution: \'Imagery from <a href="http://giscience.uni-hd.de/">GIScience Research Group @ University of Heidelberg</a> — Map data {attribution.OpenStreetMap}\'\n\t\t\t},\n\t\t\tvariants: {\n\t\t\t\tRoads: \'roads\',\n\t\t\t\tAdminBounds: {\n\t\t\t\t\toptions: {\n\t\t\t\t\t\tvariant: \'adminb\',\n\t\t\t\t\t\tmaxZoom: 19\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\tGrayscale: {\n\t\t\t\t\toptions: {\n\t\t\t\t\t\tvariant: \'roadsg\',\n\t\t\t\t\t\tmaxZoom: 19\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tMapQuestOpen: {\n\t\t\turl: \'http://otile{s}.mqcdn.com/tiles/1.0.0/map/{z}/{x}/{y}.jpeg\',\n\t\t\toptions: {\n\t\t\t\tattribution:\n\t\t\t\t\t\'Tiles Courtesy of <a href="http://www.mapquest.com/">MapQuest</a> — \' +\n\t\t\t\t\t\'Map data {attribution.OpenStreetMap}\',\n\t\t\t\tsubdomains: \'1234\'\n\t\t\t},\n\t\t\tvariants: {\n\t\t\t\tOSM: {},\n\t\t\t\tAerial: {\n\t\t\t\t\turl: \'http://oatile{s}.mqcdn.com/tiles/1.0.0/sat/{z}/{x}/{y}.jpg\',\n\t\t\t\t\toptions: {\n\t\t\t\t\t\tattribution:\n\t\t\t\t\t\t\t\'Tiles Courtesy of <a href="http://www.mapquest.com/">MapQuest</a> — \' +\n\t\t\t\t\t\t\t\'Portions Courtesy NASA/JPL-Caltech and U.S. Depart. of Agriculture, Farm Service Agency\'\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tMapBox: {\n\t\t\turl: function (id) {\n\t\t\t\treturn \'http://{s}.tiles.mapbox.com/v3/\' + id + \'/{z}/{x}/{y}.png\';\n\t\t\t},\n\t\t\toptions: {\n\t\t\t\tattribution:\n\t\t\t\t\t\'Imagery from <a href="http://mapbox.com/about/maps/">MapBox</a> — \' +\n\t\t\t\t\t\'Map data {attribution.OpenStreetMap}\',\n\t\t\t\tsubdomains: \'abcd\'\n\t\t\t}\n\t\t},\n\t\tStamen: {\n\t\t\turl: \'http://{s}.tile.stamen.com/{variant}/{z}/{x}/{y}.png\',\n\t\t\toptions: {\n\t\t\t\tattribution:\n\t\t\t\t\t\'Map tiles by <a href="http://stamen.com">Stamen Design</a>, \' +\n\t\t\t\t\t\'<a href="http://creativecommons.org/licenses/by/3.0">CC BY 3.0</a> — \' +\n\t\t\t\t\t\'Map data {attribution.OpenStreetMap}\',\n\t\t\t\tsubdomains: \'abcd\',\n\t\t\t\tminZoom: 0,\n\t\t\t\tmaxZoom: 20,\n\t\t\t\tvariant: \'toner\'\n\t\t\t},\n\t\t\tvariants: {\n\t\t\t\tToner: \'toner\',\n\t\t\t\tTonerBackground: \'toner-background\',\n\t\t\t\tTonerHybrid: \'toner-hybrid\',\n\t\t\t\tTonerLines: \'toner-lines\',\n\t\t\t\tTonerLabels: \'toner-labels\',\n\t\t\t\tTonerLite: \'toner-lite\',\n\t\t\t\tTerrain: {\n\t\t\t\t\toptions: {\n\t\t\t\t\t\tvariant: \'terrain\',\n\t\t\t\t\t\tminZoom: 4,\n\t\t\t\t\t\tmaxZoom: 18\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\tTerrainBackground: {\n\t\t\t\t\toptions: {\n\t\t\t\t\t\tvariant: \'terrain-background\',\n\t\t\t\t\t\tminZoom: 4,\n\t\t\t\t\t\tmaxZoom: 18\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\tWatercolor: {\n\t\t\t\t\toptions: {\n\t\t\t\t\t\tvariant: \'watercolor\',\n\t\t\t\t\t\tminZoom: 3,\n\t\t\t\t\t\tmaxZoom: 16\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tEsri: {\n\t\t\turl: \'https://server.arcgisonline.com/ArcGIS/rest/services/{variant}/MapServer/tile/{z}/{y}/{x}\',\n\t\t\toptions: {\n\t\t\t\tvariant: \'World_Street_Map\',\n\t\t\t\tattribution: \'Tiles © Esri\'\n\t\t\t},\n\t\t\tvariants: {\n\t\t\t\tWorldStreetMap: {\n\t\t\t\t\toptions: {\n\t\t\t\t\t\tattribution:\n\t\t\t\t\t\t\t\'{attribution.Esri} — \' +\n\t\t\t\t\t\t\t\'Source: Esri, DeLorme, NAVTEQ, USGS, Intermap, iPC, NRCAN, Esri Japan, METI, Esri China (Hong Kong), Esri (Thailand), TomTom, 2012\'\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\tDeLorme: {\n\t\t\t\t\toptions: {\n\t\t\t\t\t\tvariant: \'Specialty/DeLorme_World_Base_Map\',\n\t\t\t\t\t\tminZoom: 1,\n\t\t\t\t\t\tmaxZoom: 11,\n\t\t\t\t\t\tattribution: \'{attribution.Esri} — Copyright: ©2012 DeLorme\'\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\tWorldTopoMap: {\n\t\t\t\t\toptions: {\n\t\t\t\t\t\tvariant: \'World_Topo_Map\',\n\t\t\t\t\t\tattribution:\n\t\t\t\t\t\t\t\'{attribution.Esri} — \' +\n\t\t\t\t\t\t\t\'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\'\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\tWorldImagery: {\n\t\t\t\t\toptions: {\n\t\t\t\t\t\tvariant: \'World_Imagery\',\n\t\t\t\t\t\tattribution:\n\t\t\t\t\t\t\t\'{attribution.Esri} — \' +\n\t\t\t\t\t\t\t\'Source: Esri, i-cubed, USDA, USGS, AEX, GeoEye, Getmapping, Aerogrid, IGN, IGP, UPR-EGP, and the GIS User Community\'\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\tWorldTerrain: {\n\t\t\t\t\toptions: {\n\t\t\t\t\t\tvariant: \'World_Terrain_Base\',\n\t\t\t\t\t\tmaxZoom: 13,\n\t\t\t\t\t\tattribution:\n\t\t\t\t\t\t\t\'{attribution.Esri} — \' +\n\t\t\t\t\t\t\t\'Source: USGS, Esri, TANA, DeLorme, and NPS\'\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\tWorldShadedRelief: {\n\t\t\t\t\toptions: {\n\t\t\t\t\t\tvariant: \'World_Shaded_Relief\',\n\t\t\t\t\t\tmaxZoom: 13,\n\t\t\t\t\t\tattribution: \'{attribution.Esri} — Source: Esri\'\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\tWorldPhysical: {\n\t\t\t\t\toptions: {\n\t\t\t\t\t\tvariant: \'World_Physical_Map\',\n\t\t\t\t\t\tmaxZoom: 8,\n\t\t\t\t\t\tattribution: \'{attribution.Esri} — Source: US National Park Service\'\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\tOceanBasemap: {\n\t\t\t\t\toptions: {\n\t\t\t\t\t\tvariant: \'Ocean_Basemap\',\n\t\t\t\t\t\tmaxZoom: 13,\n\t\t\t\t\t\tattribution: \'{attribution.Esri} — Sources: GEBCO, NOAA, CHS, OSU, UNH, CSUMB, National Geographic, DeLorme, NAVTEQ, and Esri\'\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\tNatGeoWorldMap: {\n\t\t\t\t\toptions: {\n\t\t\t\t\t\tvariant: \'NatGeo_World_Map\',\n\t\t\t\t\t\tmaxZoom: 16,\n\t\t\t\t\t\tattribution: \'{attribution.Esri} — National Geographic, Esri, DeLorme, NAVTEQ, UNEP-WCMC, USGS, NASA, ESA, METI, NRCAN, GEBCO, NOAA, iPC\'\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\tWorldGrayCanvas: {\n\t\t\t\t\toptions: {\n\t\t\t\t\t\tvariant: \'Canvas/World_Light_Gray_Base\',\n\t\t\t\t\t\tmaxZoom: 16,\n\t\t\t\t\t\tattribution: \'{attribution.Esri} — Esri, DeLorme, NAVTEQ\'\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tOpenWeatherMap: {\n\t\t\turl: \'http://{s}.tile.openweathermap.org/map/{variant}/{z}/{x}/{y}.png\',\n\t\t\toptions: {\n\t\t\t\tattribution: \'Map data © <a href="http://openweathermap.org">OpenWeatherMap</a>\',\n\t\t\t\topacity: 0.5\n\t\t\t},\n\t\t\tvariants: {\n\t\t\t\tClouds: \'clouds\',\n\t\t\t\tCloudsClassic: \'clouds_cls\',\n\t\t\t\tPrecipitation: \'precipitation\',\n\t\t\t\tPrecipitationClassic: \'precipitation_cls\',\n\t\t\t\tRain: \'rain\',\n\t\t\t\tRainClassic: \'rain_cls\',\n\t\t\t\tPressure: \'pressure\',\n\t\t\t\tPressureContour: \'pressure_cntr\',\n\t\t\t\tWind: \'wind\',\n\t\t\t\tTemperature: \'temp\',\n\t\t\t\tSnow: \'snow\'\n\t\t\t}\n\t\t},\n\t\tHERE: {\n\t\t\t/*\n\t\t\t * HERE maps, formerly Nokia maps.\n\t\t\t * These basemaps are free, but you need an API key. Please sign up at\n\t\t\t * http://developer.here.com/getting-started\n\t\t\t *\n\t\t\t * Note that the base urls contain \'.cit\' whichs is HERE\'s\n\t\t\t * \'Customer Integration Testing\' environment. Please remove for production\n\t\t\t * envirionments.\n\t\t\t */\n\t\t\turl:\n\t\t\t\t\'http://{s}.{base}.maps.cit.api.here.com/maptile/2.1/\' +\n\t\t\t\t\'maptile/{mapID}/{variant}/{z}/{x}/{y}/256/png8?\' +\n\t\t\t\t\'app_id={app_id}&app_code={app_code}\',\n\t\t\toptions: {\n\t\t\t\tattribution:\n\t\t\t\t\t\'Map © 1987-2014 <a href="http://developer.here.com">HERE</a>\',\n\t\t\t\tsubdomains: \'1234\',\n\t\t\t\tmapID: \'newest\',\n\t\t\t\t\'app_id\': \'<insert your app_id here>\',\n\t\t\t\t\'app_code\': \'<insert your app_code here>\',\n\t\t\t\tbase: \'base\',\n\t\t\t\tvariant: \'normal.day\',\n\t\t\t\tminZoom: 0,\n\t\t\t\tmaxZoom: 20\n\t\t\t},\n\t\t\tvariants: {\n\t\t\t\tnormalDay: \'normal.day\',\n\t\t\t\tnormalDayCustom: \'normal.day.custom\',\n\t\t\t\tnormalDayGrey: \'normal.day.grey\',\n\t\t\t\tnormalDayMobile: \'normal.day.mobile\',\n\t\t\t\tnormalDayGreyMobile: \'normal.day.grey.mobile\',\n\t\t\t\tnormalDayTransit: \'normal.day.transit\',\n\t\t\t\tnormalDayTransitMobile: \'normal.day.transit.mobile\',\n\t\t\t\tnormalNight: \'normal.night\',\n\t\t\t\tnormalNightMobile: \'normal.night.mobile\',\n\t\t\t\tnormalNightGrey: \'normal.night.grey\',\n\t\t\t\tnormalNightGreyMobile: \'normal.night.grey.mobile\',\n\n\t\t\t\tcarnavDayGrey: \'carnav.day.grey\',\n\t\t\t\thybridDay: {\n\t\t\t\t\toptions: {\n\t\t\t\t\t\tbase: \'aerial\',\n\t\t\t\t\t\tvariant: \'hybrid.day\'\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\thybridDayMobile: {\n\t\t\t\t\toptions: {\n\t\t\t\t\t\tbase: \'aerial\',\n\t\t\t\t\t\tvariant: \'hybrid.day.mobile\'\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\tpedestrianDay: \'pedestrian.day\',\n\t\t\t\tpedestrianNight: \'pedestrian.night\',\n\t\t\t\tsatelliteDay: {\n\t\t\t\t\toptions: {\n\t\t\t\t\t\tbase: \'aerial\',\n\t\t\t\t\t\tvariant: \'satellite.day\'\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\tterrainDay: {\n\t\t\t\t\toptions: {\n\t\t\t\t\t\tbase: \'aerial\',\n\t\t\t\t\t\tvariant: \'terrain.day\'\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\tterrainDayMobile: {\n\t\t\t\t\toptions: {\n\t\t\t\t\t\tbase: \'aerial\',\n\t\t\t\t\t\tvariant: \'terrain.day.mobile\'\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tAcetate: {\n\t\t\turl: \'http://a{s}.acetate.geoiq.com/tiles/{variant}/{z}/{x}/{y}.png\',\n\t\t\toptions: {\n\t\t\t\tattribution:\n\t\t\t\t\t\'©2012 Esri & Stamen, Data from OSM and Natural Earth\',\n\t\t\t\tsubdomains: \'0123\',\n\t\t\t\tminZoom: 2,\n\t\t\t\tmaxZoom: 18,\n\t\t\t\tvariant: \'acetate-base\'\n\t\t\t},\n\t\t\tvariants: {\n\t\t\t\tbasemap: \'acetate-base\',\n\t\t\t\tterrain: \'terrain\',\n\t\t\t\tall: \'acetate-hillshading\',\n\t\t\t\tforeground: \'acetate-fg\',\n\t\t\t\troads: \'acetate-roads\',\n\t\t\t\tlabels: \'acetate-labels\',\n\t\t\t\thillshading: \'hillshading\'\n\t\t\t}\n\t\t}\n\t};\n\n\tL.tileLayer.provider = function (provider, options) {\n\t\treturn new L.TileLayer.Provider(provider, options);\n\t};\n\n\tL.Control.Layers.Provided = L.Control.Layers.extend({\n\t\tinitialize: function (base, overlay, options) {\n\t\t\tvar first;\n\n\t\t\tvar labelFormatter = function (label) {\n\t\t\t\treturn label.replace(/\\./g, \': \').replace(/([a-z])([A-Z])/g, \'$1 $2\');\n\t\t\t};\n\n\t\t\tif (base.length) {\n\t\t\t\t(function () {\n\t\t\t\t\tvar out = {},\n\t\t\t\t\t len = base.length,\n\t\t\t\t\t i = 0;\n\n\t\t\t\t\twhile (i < len) {\n\t\t\t\t\t\tif (typeof base[i] === \'string\') {\n\t\t\t\t\t\t\tif (i === 0) {\n\t\t\t\t\t\t\t\tfirst = L.tileLayer.provider(base[0]);\n\t\t\t\t\t\t\t\tout[labelFormatter(base[i])] = first;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tout[labelFormatter(base[i])] = L.tileLayer.provider(base[i]);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\ti++;\n\t\t\t\t\t}\n\t\t\t\t\tbase = out;\n\t\t\t\t}());\n\t\t\t\tthis._first = first;\n\t\t\t}\n\n\t\t\tif (overlay && overlay.length) {\n\t\t\t\t(function () {\n\t\t\t\t\tvar out = {},\n\t\t\t\t\t len = overlay.length,\n\t\t\t\t\t i = 0;\n\n\t\t\t\t\twhile (i < len) {\n\t\t\t\t\t\tif (typeof overlay[i] === \'string\') {\n\t\t\t\t\t\t\tout[labelFormatter(overlay[i])] = L.tileLayer.provider(overlay[i]);\n\t\t\t\t\t\t}\n\t\t\t\t\t\ti++;\n\t\t\t\t\t}\n\t\t\t\t\toverlay = out;\n\t\t\t\t}());\n\t\t\t}\n\t\t\tL.Control.Layers.prototype.initialize.call(this, base, overlay, options);\n\t\t},\n\t\tonAdd: function (map) {\n\t\t\tthis._first.addTo(map);\n\t\t\treturn L.Control.Layers.prototype.onAdd.call(this, map);\n\t\t}\n\t});\n\n\tL.control.layers.provided = function (baseLayers, overlays, options) {\n\t\treturn new L.Control.Layers.Provided(baseLayers, overlays, options);\n\t};\n}());\n\n//Utility functions for map info window\nfunction mapit(obj) {\n lat = parseFloat(obj.attr(\'data-latitude\'));\n lon = parseFloat(obj.attr(\'data-longitude\'));\n elid= obj.attr(\'data-imgid\');\n map = L.map(document.getElementById("mw-"+elid));\n centerCoord = new L.LatLng(lat, lon);\n zoom = 8;\n L.tileLayer.provider(\'Esri.WorldTopoMap\', {maxZoom: 18, attribution: \'Map data © <a href="http://openstreetmap.org">OpenStreetMap</a> contributors, <a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, Tiles © Esri and the GIS User Community\'}).addTo(map);\n map.setView(centerCoord, zoom);\n L.marker([lat, lon]).addTo(map);\n}\n //########## utility functions to create/remove map container ############\nfunction create_map(obj) {\n //find id of this image caption:\n var imgid = obj.attr(\'data-imgid\');\n //create container divs\n $(\'<div class="map-container" id="mc-\'+imgid+\'">\').insertBefore($(obj).parent().parent());\n //$(obj).parent().parent().parent().prepend(\'<div class="map-container" id="mc-\'+imgid+\'">\');\n $(\'#mc-\'+imgid).append(\'<div class="map-wrapper" id="mw-\'+imgid+\'">\');\n //deal with the variable height of div.legend\n $(\'#mc-\'+imgid).css({\n bottom: function(index, value) {\n return parseFloat($(obj).parent().parent().height())+20;\n }\n });\n \n mapit(obj);\n}\nfunction remove_map(imgid) {\n $(\'#mc-\'+imgid).remove();\n}\n\n//############ Document.ready events ##############\n$(document).ready(function(){ \n\n //set up click events for map button\n $(\'.map-link\').click( function() {\n imgid = $(this).attr(\'data-imgid\');\n if ($(\'#mc-\'+imgid).is(":visible")) {\n remove_map(imgid); \n } else {\n create_map($(this));\n }\n return false;\n \n });\n var $ele = $(\'#slides\').children();\n var $curr = 0;\n\t$(document).bind(\'keydown\', function (e) {\n var code = e.which;\n switch (code) {\n case 39:\n if ($curr <= $ele.size()) {\n $.scrollTo($ele[$curr], 800 );\n $curr++;\n }\n break;\n case 37:\n if ($curr > 0) {\n $curr--;\n var $now = $curr;\n $now--;\n $.scrollTo($ele[$now], 800 );\n }\n break;\n }\n return;\n });\n});\n\n'
\ No newline at end of file +(function(){'use strict';L.TileLayer.Provider=L.TileLayer.extend({initialize:function(arg,options){var providers=L.TileLayer.Provider.providers;var parts=arg.split('.');var providerName=parts[0];var variantName=parts[1];if(!providers[providerName]){throw'No such provider ('+providerName+')';} +var provider={url:providers[providerName].url,options:providers[providerName].options};if(variantName&&'variants'in providers[providerName]){if(!(variantName in providers[providerName].variants)){throw'No such variant of '+providerName+' ('+variantName+')';} +var variant=providers[providerName].variants[variantName];var variantOptions;if(typeof variant==='string'){variantOptions={variant:variant};}else{variantOptions=variant.options;} +provider={url:variant.url||provider.url,options:L.Util.extend({},provider.options,variantOptions)};}else if(typeof provider.url==='function'){provider.url=provider.url(parts.splice(1,parts.length-1).join('.'));} +var attributionReplacer=function(attr){if(attr.indexOf('{attribution.')===-1){return attr;} +return attr.replace(/\{attribution.(\w*)\}/,function(match,attributionName){return attributionReplacer(providers[attributionName].options.attribution);});};provider.options.attribution=attributionReplacer(provider.options.attribution); var layerOpts=L.Util.extend({},provider.options,options);L.TileLayer.prototype.initialize.call(this,provider.url,layerOpts);}}); L.TileLayer.Provider.providers={OpenStreetMap:{url:'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',options:{attribution:'© <a href="http://openstreetmap.org">OpenStreetMap</a> contributors, '+'<a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>'},variants:{Mapnik:{},BlackAndWhite:{url:'http://{s}.www.toolserver.org/tiles/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}}}},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(id){return'http://{s}.tiles.mapbox.com/v3/'+id+'/{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:3,maxZoom:16}}}},Esri:{url:'https://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 © <a href="http://openweathermap.org">OpenWeatherMap</a>',opacity:0.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 <a href="http://developer.here.com">HERE</a>',subdomains:'1234',mapID:'newest','app_id':'<insert your app_id here>','app_code':'<insert your app_code here>',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'}}};L.tileLayer.provider=function(provider,options){return new L.TileLayer.Provider(provider,options);};L.Control.Layers.Provided=L.Control.Layers.extend({initialize:function(base,overlay,options){var first;var labelFormatter=function(label){return label.replace(/\./g,': ').replace(/([a-z])([A-Z])/g,'$1 $2');};if(base.length){(function(){var out={},len=base.length,i=0;while(i<len){if(typeof base[i]==='string'){if(i===0){first=L.tileLayer.provider(base[0]);out[labelFormatter(base[i])]=first;}else{out[labelFormatter(base[i])]=L.tileLayer.provider(base[i]);}} +i++;} +base=out;}());this._first=first;} +if(overlay&&overlay.length){(function(){var out={},len=overlay.length,i=0;while(i<len){if(typeof overlay[i]==='string'){out[labelFormatter(overlay[i])]=L.tileLayer.provider(overlay[i]);} +i++;} +overlay=out;}());} +L.Control.Layers.prototype.initialize.call(this,base,overlay,options);},onAdd:function(map){this._first.addTo(map);return L.Control.Layers.prototype.onAdd.call(this,map);}});L.control.layers.provided=function(baseLayers,overlays,options){return new L.Control.Layers.Provided(baseLayers,overlays,options);};}());function mapit(obj){lat=parseFloat(obj.attr('data-latitude'));lon=parseFloat(obj.attr('data-longitude'));elid=obj.attr('data-imgid');map=L.map(document.getElementById("mw-"+elid));centerCoord=new L.LatLng(lat,lon);zoom=8;L.tileLayer.provider('Esri.WorldTopoMap',{maxZoom:18,attribution:'Map data © <a href="http://openstreetmap.org">OpenStreetMap</a> contributors, <a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, Tiles © Esri and the GIS User Community'}).addTo(map);map.setView(centerCoord,zoom);L.marker([lat,lon]).addTo(map);} +function create_map(obj){var imgid=obj.attr('data-imgid'); $('<div class="map-container" id="mc-'+imgid+'">').insertBefore($(obj).parent().parent());$('#mc-'+imgid).append('<div class="map-wrapper" id="mw-'+imgid+'">'); $('#mc-'+imgid).css({bottom:function(index,value){return parseFloat($(obj).parent().parent().height())+20;}});mapit(obj);} +function remove_map(imgid){$('#mc-'+imgid).remove();} +$(document).ready(function(){ $('.map-link').click(function(){imgid=$(this).attr('data-imgid');if($('#mc-'+imgid).is(":visible")){remove_map(imgid);}else{create_map($(this));} +return false;});var $ele=$('#slides').children();var $curr=0;$(document).bind('keydown',function(e){var code=e.which;switch(code){case 39:if($curr<=$ele.size()){$.scrollTo($ele[$curr],800);$curr++;} +break;case 37:if($curr>0){$curr--;var $now=$curr;$now--;$.scrollTo($ele[$now],800);} +break;} +return;});});
\ No newline at end of file |