mirror of
https://git.coop/cotech/website.git
synced 2024-12-18 08:43:06 +00:00
1 line
2.1 KiB
Plaintext
1 line
2.1 KiB
Plaintext
{"version":3,"sources":["app.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"app.js","sourcesContent":["$(document).foundation();\n\n$('#coops-view-tabs').on('change.zf.tabs', function() {\n window.app.createMapMultiMarker('map-coops', 54.7, -4.2, 6, window.app.mapEntries);\n});\n\nvar elem = new Foundation.Sticky($('.top-bar'));\nvar app = window.app || {};\n\nvar mapboxAccessToken = window.mapboxAccessToken || '';\n\napp.apiUrl = 'https://api.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token=' + mapboxAccessToken;\n\napp.tileLayerOptions = {\n maxZoom: 18,\n 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>, ' + 'Imagery © <a href=\"http://mapbox.com\">Mapbox</a>',\n id: 'mapbox.streets',\n token: window.mapboxAccessToken\n};\n\napp.map = null;\n\napp.createMap = function(mapId, lat, lng, zoom) {\n window.app.map = L.map(mapId).setView([lat, lng], zoom);\n}\n\napp.createMapSingleMarker = function(mapId, lat, lng, zoom, markerText) {\n if (!window.app.map) {\n window.app.createMap(mapId, lat, lng, zoom);\n var myMap = window.app.map;\n\n L.tileLayer(window.app.apiUrl, window.app.tileLayerOptions).addTo(myMap);\n\n var marker = L.marker([lat - 0.0005, lng]).addTo(myMap);\n marker.bindPopup(markerText).openPopup();\n }\n}\n\napp.createMapMultiMarker = function(mapId, lat, lng, zoom, markersArray) {\n if (!window.app.map) {\n window.app.createMap(mapId, lat, lng, zoom);\n var myMap = window.app.map;\n\n L.tileLayer(window.app.apiUrl, window.app.tileLayerOptions).addTo(myMap);\n\n markersArray.forEach(function (markerVar) {\n var marker = L.marker([markerVar.lat, markerVar.lng]).addTo(myMap);\n marker.bindPopup(markerVar.markerText);\n });\n }\n};\n"]} |