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,EAAE,QAAQ;EACvB,SAAS,EAAE,CACP;IACI,YAAY,EAAE;EAClB,CAAC;AAET,CAAC,EACD;EACI,aAAa,EAAE,cAAc;EAC7B,aAAa,EAAE,kBAAkB;EACjC,SAAS,EAAE,CACP;IACI,YAAY,EAAE;EAClB,CAAC;AAET,CAAC,EACD;EACI,aAAa,EAAE,cAAc;EAC7B,aAAa,EAAE,oBAAoB;EACnC,SAAS,EAAE,CACP;IACI,YAAY,EAAE;EAClB,CAAC;AAET,CAAC,EACD;EACI,aAAa,EAAE,cAAc;EAC7B,aAAa,EAAE,aAAa;EAC5B,SAAS,EAAE,CACP;IACI,YAAY,EAAE;EAClB,CAAC;AAET,CAAC,CACJ","sources":["webpack://hnbm_2021/./scripts/controllers/mapBlock/controller.js","webpack://hnbm_2021/./scripts/controllers/mapBlock/mapBlock.js","webpack://hnbm_2021/./scripts/libraries/mapStyling.js"],"sourcesContent":["import MapBlock from './mapBlock';\r\n\r\nexport default class LocationBlockController {\r\n constructor() {\r\n this.instances = [];\r\n this.init();\r\n\r\n this.mapPromise = null; // Used to determine if the Maps api is available\r\n this.apiKey = null; // Maps API key\r\n }\r\n\r\n init() {\r\n if (document.querySelector('section.blMap .mapContainer[data-key]')) {\r\n this.apiKey = document.querySelector('section.blMap .mapContainer[data-key]').dataset.key;\r\n\r\n this.loadMapsApi().then(() => {\r\n document.querySelectorAll('section.blMap .mapContainer').forEach(mapContainer => {\r\n this.instances.push(new MapBlock(mapContainer));\r\n });\r\n });\r\n }\r\n }\r\n\r\n loadMapsApi() {\r\n if (this.mapPromise) {\r\n return this.mapPromise;\r\n }\r\n\r\n this.mapPromise = new Promise(resolve => {\r\n if (window.google && window.google.maps) {\r\n resolve();\r\n } else if (this.map) {\r\n resolve();\r\n } else {\r\n // Create public function that gets called when Maps is loaded\r\n let functionName = `mapsLoaded_${Math.random().toString(12).substring(2, 12) + Math.random().toString(12).substring(2, 6)}`;\r\n window[functionName] = () => {\r\n delete window[functionName];\r\n resolve();\r\n }\r\n\r\n const script = document.createElement('script');\r\n script.setAttribute('src', `https://maps.googleapis.com/maps/api/js?key=${this.apiKey}&callback=${functionName}`);\r\n document.body.appendChild(script);\r\n }\r\n });\r\n\r\n return this.mapPromise;\r\n }\r\n}","import mapStyling from './../../libraries/mapStyling';\r\n\r\nexport default class MapBlock {\r\n constructor(container) {\r\n this.container = container;\r\n this.map = null;\r\n this.marker = null;\r\n this.lat = null;\r\n this.lon = null;\r\n this.zoom = null;\r\n\r\n this.init();\r\n }\r\n\r\n init() {\r\n if (this.container.dataset.lat && this.container.dataset.lon) {\r\n this.lat = parseFloat(this.container.dataset.lat);\r\n this.lon = parseFloat(this.container.dataset.lon);\r\n this.zoom = parseFloat(this.container.dataset.zoom) || 15;\r\n\r\n this.map = new google.maps.Map(this.container.querySelector('.map'), {\r\n center: {\r\n lat: this.lat,\r\n lng: this.lon\r\n },\r\n zoom: this.zoom,\r\n draggable: false,\r\n styles: mapStyling,\r\n disableDefaultUI: true,\r\n });\r\n\r\n this.marker = new google.maps.Marker({\r\n map: this.map,\r\n position: {\r\n lat: this.lat,\r\n lng: this.lon\r\n },\r\n icon: {\r\n url: '/img/markerBig.svg',\r\n size: new google.maps.Size(44, 52),\r\n origin: new google.maps.Point(0, 0),\r\n anchor: new google.maps.Point(3, 30),\r\n },\r\n });\r\n }\r\n }\r\n}","export default [\r\n {\r\n \"featureType\": \"poi.attraction\",\r\n \"elementType\": \"all\",\r\n \"stylers\": [\r\n {\r\n \"visibility\": \"on\"\r\n },\r\n {\r\n \"color\": \"#000000\", // Pink color for attractions\r\n }\r\n ]\r\n },\r\n {\r\n \"featureType\": \"poi.attraction\",\r\n \"elementType\": \"labels.text.stroke\",\r\n \"stylers\": [\r\n {\r\n \"visibility\": \"off\" // Removes the text stroke\r\n }\r\n ]\r\n },\r\n {\r\n \"featureType\": \"poi.business\",\r\n \"elementType\": \"all\",\r\n \"stylers\": [\r\n {\r\n \"visibility\": \"off\"\r\n }\r\n ]\r\n },\r\n {\r\n \"featureType\": \"poi.government\",\r\n \"elementType\": \"all\",\r\n \"stylers\": [\r\n {\r\n \"visibility\": \"off\"\r\n }\r\n ]\r\n },\r\n {\r\n \"featureType\": \"poi.medical\",\r\n \"elementType\": \"all\",\r\n \"stylers\": [\r\n {\r\n \"visibility\": \"off\"\r\n }\r\n ]\r\n },\r\n {\r\n \"featureType\": \"poi.park\",\r\n \"elementType\": \"all\",\r\n \"stylers\": [\r\n {\r\n \"visibility\": \"on\"\r\n }\r\n ]\r\n },\r\n {\r\n \"featureType\": \"poi.place_of_worship\",\r\n \"elementType\": \"all\",\r\n \"stylers\": [\r\n {\r\n \"visibility\": \"on\"\r\n }\r\n ]\r\n },\r\n {\r\n \"featureType\": \"poi.school\",\r\n \"elementType\": \"all\",\r\n \"stylers\": [\r\n {\r\n \"visibility\": \"off\"\r\n }\r\n ]\r\n },\r\n {\r\n \"featureType\": \"poi.sports_complex\",\r\n \"elementType\": \"all\",\r\n \"stylers\": [\r\n {\r\n \"visibility\": \"off\"\r\n }\r\n ]\r\n },\r\n {\r\n \"featureType\": \"road.highway\",\r\n \"elementType\": \"labels\",\r\n \"stylers\": [\r\n {\r\n \"visibility\": \"simplified\"\r\n }\r\n ]\r\n },\r\n {\r\n \"featureType\": \"road.highway\",\r\n \"elementType\": \"labels.text.fill\",\r\n \"stylers\": [\r\n {\r\n \"visibility\": \"off\"\r\n }\r\n ]\r\n },\r\n {\r\n \"featureType\": \"road.highway\",\r\n \"elementType\": \"labels.text.stroke\",\r\n \"stylers\": [\r\n {\r\n \"visibility\": \"off\"\r\n }\r\n ]\r\n },\r\n {\r\n \"featureType\": \"road.highway\",\r\n \"elementType\": \"labels.icon\",\r\n \"stylers\": [\r\n {\r\n \"visibility\": \"off\"\r\n }\r\n ]\r\n }\r\n];"],"names":["MapBlock","LocationBlockController","_classCallCheck","instances","init","mapPromise","apiKey","_createClass","key","value","_this","document","querySelector","dataset","loadMapsApi","then","querySelectorAll","forEach","mapContainer","push","_this2","Promise","resolve","window","google","maps","map","functionName","concat","Math","random","toString","substring","script","createElement","setAttribute","body","appendChild","default","mapStyling","container","marker","lat","lon","zoom","parseFloat","Map","center","lng","draggable","styles","disableDefaultUI","Marker","position","icon","url","size","Size","origin","Point","anchor"],"sourceRoot":""}