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\'© OpenStreetMap contributors, \' +\n\t\t\t\t\t\'CC-BY-SA\'\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 Humanitarian OpenStreetMap Team\'\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: © OpenSeaMap 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\'© OpenCycleMap, {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 GIScience Research Group @ University of Heidelberg — 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 MapQuest — \' +\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 MapQuest — \' +\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 MapBox — \' +\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 Stamen Design, \' +\n\t\t\t\t\t\'CC BY 3.0 — \' +\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 © OpenWeatherMap\',\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 HERE\',\n\t\t\t\tsubdomains: \'1234\',\n\t\t\t\tmapID: \'newest\',\n\t\t\t\t\'app_id\': \'\',\n\t\t\t\t\'app_code\': \'\',\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(lat,lon,zoom,id) {\n map = L.map(document.getElementById("map-wrapper-"+id));\n centerCoord = new L.LatLng(lat, lon);\n zoom = zoom;\n L.tileLayer.provider(\'Esri.WorldTopoMap\', {maxZoom: 18, attribution: \'Map data © OpenStreetMap contributors, CC-BY-SA, Tiles © Esri and the GIS User Community\'}).addTo(map);\n map.setView(centerCoord, zoom);\n ////get the geojson for this map\n $.ajax({\n url: "/projects/data/natparks/"+id+".json",\n dataType: "json",\n success: function(data, text, request) { draw_poly(data, map); } \n //complete: function(xhr, status) {console.log(status); return false; },\n });\n //draw the polygon\n function draw_poly(data, map) {\n var myStyle = {\n "color": "#201a11",\n "weight": 2,\n "opacity": 0.65\n };\n L.geoJson(data, {\n style: myStyle\n }).addTo(map);\n }\n} \n\n// utility functions to create/remove map container\nfunction create_map(obj) {\n var lat = parseFloat(obj.attr(\'data-latitude\'));\n\tvar lon = parseFloat(obj.attr(\'data-longitude\'));\n\tvar zoom= parseInt(obj.attr(\'data-zoom\'));\n\tvar id= obj.attr(\'data-id\');\n\n //create container divs\n $(obj).parents().eq(3).append(\'
\');\n $(\'#map-container-\'+id).append(\'
\');\n mapit(lat,lon,zoom,id);\n}\nfunction remove_map(id) {\n $(id).remove();\n}\n\n//functions to handle the "more" link\n// utility functions to create/remove camera info container\nfunction get_exif(obj,id) {\n //$(obj).parents().eq(2).append(\'
\');\n $(obj).parents().eq(3).append(\'
\'); $(obj).parents().eq(2).children(\'.meta\').clone().appendTo(\'#\'+id).css(\'visibility\', \'visible\');\n \n \n \n //deal with the variable height of div.legend\n $(\'#exif-container\').css({\n bottom: function(index, value) {\n return parseFloat($(obj).parent().parent().css("height"))-14;\n }\n });\n}\nfunction remove_exif(id) {\n $(\'#\'+id).remove();\n}\n$(document).ready(function(){ \n//set up click events for map button\n $(\'.map-link\').click( function() {\n var more_id = \'more-container-\'+$(this).parent().next().children(\'.more-link\').attr(\'id\').split(\'-\')[1];\n var id = \'#map-container-\'+$(this).attr(\'data-id\');\n if ($(\'#\'+more_id).is(":visible")){\n remove_exif(more_id);\n }\n if ($(id).is(":visible")) {\n remove_map(id); \n } else {\n create_map($(this));\n }\n return false;\n \n }); \n \n //set up click events for more info button\n $(\'.more-link\').click( function() {\n var map_id = \'#map-container-\'+$(this).parent().prev().children(\'.map-link\').attr(\'data-id\');\n var id = \'more-container-\'+this.id.split(\'-\')[1];\n if ($(map_id).is(":visible")){\n remove_map(map_id);\n }\n if ($(\'#\'+id).is(":visible")) {\n remove_exif(id);\n } else {\n get_exif(this, id);\n }\n return false;\n });\n\n});\n'