<!-- Google Maps -->
<section class="gmap">
    <div id="googlemap"></div>
</section>
<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyClmQvBU5eqTS3k_BEToj9aWlCpBgrGhmw&sensor=false"></script>

<script>
    var gmap = document.getElementById('googlemap');
    var map;
    var settings = {
        home: { latitude: 43.902456, longitude: 12.814499 },
        text: '<div class="map-popup"><img src="http://extranet.wslabs.it/fast/full/img/logo.png" alt="" /><p> Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</p></div>',
        icon_url: 'http://extranet.wslabs.it/fast/full/img/marker.png',
        zoom: 12
    }

    var coords = new google.maps.LatLng(settings.home.latitude, settings.home.longitude);



    var options = {
        zoom: settings.zoom,
        scrollwheel: false,
        center: coords,
        mapTypeId: google.maps.MapTypeId.ROADMAP,
        mapTypeControl: true,
        scaleControl: true,
        zoomControlOptions: {
            style: google.maps.ZoomControlStyle.DEFAULT
        },
        overviewMapControl: true
    };

    map = new google.maps.Map(gmap, options);

    var icon = {
        url: settings.icon_url,
        origin: new google.maps.Point(0, 0)
    };

    var marker = new google.maps.Marker({
        position: coords,
        map: map,
        icon: icon,
        draggable: false
    });

    var info = new google.maps.InfoWindow({
        content: settings.text
    });

    google.maps.event.addListener(marker, 'click', function () {
        info.open(map, marker);
    });


    // Color Settings
    var styles = [];
    map.setOptions({ styles: styles });

</script>
<!-- /Google Maps -->
@import url(http://extranet.wslabs.it/fast/css/bootstrap.min.css);
@import url(http://extranet.wslabs.it/fast/full/css/font-awesome.min.css);
@import url(http://extranet.wslabs.it/fast/full/css/main.css);


/*------------
Google Map
------------*/
#map-button .smaller { display: none; }
.gmap { height: 0; width: 100%; position: relative; z-index: 2; padding-bottom: 25%; }
#googlemap { position: absolute; z-index: 1; top: 0; left: 0; width: 100%; height: 100%; }
div.map-popup { position: relative; padding: 15px 10px 20px 10px; text-align: center; }
div.map-popup img { margin-bottom: 10px; }
div.map-popup h2 { margin-bottom: 20px; }
div.map-popup p { font-size: 0.9em; }
div.map-popup p:last-child { margin-bottom: 0; }
/* MD */
@media (min-width:992px) and (max-width:1199px) {
    .gmap { padding-bottom: 40%; }
}
/* SM */
@media (min-width:768px) and (max-width:991px) {
    .gmap { padding-bottom: 60%; }
}
/* XS */
@media (max-width:767px) {
    .gmap { padding-bottom: 80%; }
}

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.