Sha256: 4ac8cb8d206598886e6ea7bbaa3f3602a10b988fa4f5d8dd9598221352c66daf
Contents?: true
Size: 1.3 KB
Versions: 11
Compression:
Stored size: 1.3 KB
Contents
window.conference.mapConfig = (function() { let map; let mapProvider = "{{ site.conference.location.map.map_provider | default: 'OpenStreetMap.Mapnik' }}"; let homeCoord = [{{ site.conference.location.map.home_coord }}]; let zoomLevel = {{ site.conference.location.map.default_zoom | default: 17 }}; let setup = function (elId) { map = L.map(elId).setView(homeCoord, zoomLevel); L.tileLayer.provider(mapProvider).addTo(map); L.easyButton('far fa-star', function(){ map.flyTo(homeCoord, zoomLevel); }, '{{ site.data.lang[site.conference.lang].location.focus_conf | default: "Center map on conference location" }}').addTo(map); L.control.locate({ flyTo: true, strings: { title: '{{ site.data.lang[site.conference.lang].location.focus_me | default: "Show me where I am" }}' } }).addTo(map); }; let init = function () { elId = 'map'; if (document.getElementById(elId)) { setup(elId); window.conference.map = map; } }; return { init: init, default: { mapProvider: mapProvider, homeCoord: homeCoord, zoomLevel: zoomLevel } }; })(); window.conference.mapConfig.init();
Version data entries
11 entries across 11 versions & 1 rubygems