{"id":48032,"date":"2025-05-09T09:55:00","date_gmt":"2025-05-09T07:55:00","guid":{"rendered":"https:\/\/dansenshus.se\/?page_id=48032"},"modified":"2025-05-19T14:50:09","modified_gmt":"2025-05-19T12:50:09","slug":"hitta-hit","status":"publish","type":"page","link":"https:\/\/dansenshus.se\/en\/ditt-besok\/hitta-hit\/","title":{"rendered":"Find us here"},"content":{"rendered":"<h3 id=\"parkering\">Collective<\/h3>\n<p>Nearest metro stations: T-Centralen and H\u00f6torget.<br \/>\nNearest bus stop: Norra Bantorget<\/p>\n<div id=\"map\">\n    <div id=\"map-template-container\"><\/div>\n<\/div><style>#map {\n    width: 100%;\n    background-image: url(https:\/\/dansenshus.se\/\/wp-content\/uploads\/2025\/05\/google-maps-bg.jpg);\n    height: 480px;\n    background-size: cover;\n    padding: 20px;\n    background-position: bottom left;\n}\n#map form {\n    margin-bottom: 5px;\n}\n#map-template-container {\n    max-width: 600px;\n}<\/style><script>function initMap() {\n    const latitude = parseFloat(59.3366809);\n    const longitude = parseFloat(18.0537463);\n    const map = new google.maps.Map(document.getElementById('map'), {\n        center: { lat: latitude, lng: longitude },\n        zoom: 13,\n        mapTypeControl: false,\n        mapId: '1' \n    });\n    \/\/ Add a marker at the specified coordinates\n    const marker = new google.maps.marker.AdvancedMarkerElement ({\n        position: { lat: latitude, lng: longitude },\n        map: map,\n        title: 'Your Location',\n    });\n    \/\/ Create the InfoWindow (popup)\n    const infoWindow = new google.maps.InfoWindow({\n        ariaLabel: \"Dansens Hus\",\n        content: '<div style=\"font-size: small; padding-bottom: 2px\">Barnhusgatan 12-14<br>111 24 Stockholm<br><br><a href=\"https:\/\/maps.google.com\/maps\/dir\/\/Dansens+Hus+Barnhusgatan+12-14+111+24+Stockholm+Sweden\/@59.3366782,18.0563212,15z\/data=!4m5!4m4!1m0!1m2!1m1!1s0x465f9d668c0c67c1:0x2e7a286bbd2c62d8\" target=\"_blank\">V\u00e4gbeskrivning<\/a><\/div>',\n    });\n    \/\/ Show the InfoWindow by default\n    infoWindow.open(map, marker);\n    \/\/ Modify the title area of the InfoWindow\n    google.maps.event.addListener(infoWindow, 'domready', function () {\n        \/\/ Wait for the InfoWindow DOM to be ready, then modify the title area\n        const iwTitle = document.querySelector('.gm-style-iw-ch');\n        if (iwTitle) {\n            iwTitle.innerHTML = '<strong style=\"font-size: medium\">Dansens Hus<\/strong>'; \/\/ Set the title content\n        }\n    });\n    \/\/ Add a click event to open the InfoWindow when the marker is clicked\n    marker.addListener('click', function () {\n        infoWindow.open(map, marker);\n    });\n    \n}\nfunction loadMap() {\n    \/\/ Create and append the iframe only after consent\n    const script = document.createElement('script');\n    script.src = `https:\/\/maps.googleapis.com\/maps\/api\/js?key=AIzaSyCdvBustXMuAip7_mnNB7_W1bL8oBYoUp8&callback=initMap&libraries=marker`;\n    script.async = true;\n    script.defer = true;\n    document.head.appendChild(script);\n    \/\/setConsent();\n}\nwindow.addEventListener(\"DOMContentLoaded\", function () {\n    const map = document.getElementById(\"map\");\n    if (consentGiven()) {\n        loadMap();\n    } else {\n        map.style.display = \"block\";\n        \/\/ Add content to the chat-info window\n        insertConsentTemplate(\"#map-template-container\", \"google.com\");\n        map.addEventListener('switchToggled', (e) => {\n            if (e.detail.isChecked) {\n                loadMap();\n                \/\/map.style.display = \"none\";\n            } else {\n                map.style.display = \"block\";\n            }\n        });\n    }\n})<\/script>","protected":false},"excerpt":{"rendered":"<p>Find out how to get to Dansens Hus here.<\/p>","protected":false},"author":28,"featured_media":38057,"parent":48177,"menu_order":60,"comment_status":"closed","ping_status":"closed","template":"","meta":{"slim_seo":{"title":"Find here - Dansens Hus","description":"Find out how to get to Dansens Hus here."},"footnotes":""},"class_list":["post-48032","page","type-page","status-publish","has-post-thumbnail","hentry"],"meta_box":{"components":[{"linkbox":{"linkbox_background":"#f4f4f4"}}],"grid_description":"","mobile_featured_image":false,"background_topbanner":"","color_topbanner":"light","overlay_topbanner":"light","gradient_topbanner":"0","shows_mode":"","shows_posts":[],"shows_max":"","post_cards":[],"media_type_topbanner":"","single_image_topbanner":false,"video_topbanner":[],"rubrik_topbanner":"","underrubrik_topbanner":"","datum_topbanner":"","post_topbanner":"","featured_event":""},"_links":{"self":[{"href":"https:\/\/dansenshus.se\/en\/wp-json\/wp\/v2\/pages\/48032","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dansenshus.se\/en\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/dansenshus.se\/en\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/dansenshus.se\/en\/wp-json\/wp\/v2\/users\/28"}],"replies":[{"embeddable":true,"href":"https:\/\/dansenshus.se\/en\/wp-json\/wp\/v2\/comments?post=48032"}],"version-history":[{"count":0,"href":"https:\/\/dansenshus.se\/en\/wp-json\/wp\/v2\/pages\/48032\/revisions"}],"up":[{"embeddable":true,"href":"https:\/\/dansenshus.se\/en\/wp-json\/wp\/v2\/pages\/48177"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/dansenshus.se\/en\/wp-json\/wp\/v2\/media\/38057"}],"wp:attachment":[{"href":"https:\/\/dansenshus.se\/en\/wp-json\/wp\/v2\/media?parent=48032"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}