function initMap() {

        dummyData = initData();

        /**
         * Block containing countries data
         */
        var $ul = $('ul.striped-list').empty();

        /**
         * Create map with center at Russia
         */
        map = dummyData.countries.Russia.createMap('#map').on('click', function() {
            /**
             * Close overview window while click on map
             */
            overviewOpened = true;
            triggerOverview();
        });

        /**
         * Filling countries data
         */
        Object.keys(dummyData.countries).map(function(countryName, index) {

            var country = dummyData.countries[countryName];
            /**
             * Create map marker for each country
             */
            var marker = country.createMarker(map).on('click', function() {
                outputOverview(country);
                overviewOpened = false;
                triggerOverview();
            });

            $ul.append(
                $('<li/>', {
                    'class': 'striped-list-item',
                    'data-overview-toggle': ''
                }).append(
                    $('<span/>', {
                        'class': 'striped-list-item__index',
                        'html': index + 1
                    })
                ).append(
                    $('<img/>', {
                        'class': 'striped-list-item__flag'
                    }).attr('src', 'img/flags/' + country.data('code') + '.png').attr('alt', country.data('name'))
                ).append(
                    $('<span/>', {
                        'class': 'striped-list-item__name',
                        'html': country.data('name')
                    })
                ).on('mouseover', function() {
                    /**
                     * Scroll map to country marker and show marker info window
                     */
                    map.panTo(country);
                    marker.infoWindow.show();
                }).on('click', function() {
                    /**
                     * Open overview window with country data
                     */
                    outputOverview(country);
                    overviewOpened = false;
                    triggerOverview();
                })
            );

        });

    }
/**
     * Map initialization (Google Maps callback function)
     */
Map initialization (Google Maps callback function)
Map initialization ( Google Maps callback function )
function initMap() {
        dummyData = initData();
        var $ul = $('ul.striped-list').empty();
        map = dummyData.countries.Russia.createMap('#map').on('click', function() {
            overviewOpened = true;
            triggerOverview();
        });
        Object.keys(dummyData.countries).map(function(countryName, index) {
            var country = dummyData.countries[countryName];
            var marker = country.createMarker(map).on('click', function() {
                outputOverview(country);
                overviewOpened = false;
                triggerOverview();
            });
            $ul.append(
                $('<li/>', {
                    'class': 'striped-list-item',
                    'data-overview-toggle': ''
                }).append(
                    $('<span/>', {
                        'class': 'striped-list-item__index',
                        'html': index + 1
                    })
                ).append(
                    $('<img/>', {
                        'class': 'striped-list-item__flag'
                    }).attr('src', 'img/flags/' + country.data('code') + '.png').attr('alt', country.data('name'))
                ).append(
                    $('<span/>', {
                        'class': 'striped-list-item__name',
                        'html': country.data('name')
                    })
                ).on('mouseover', function() {
                    map.panTo(country);
                    marker.infoWindow.show();
                }).on('click', function() {
                    outputOverview(country);
                    overviewOpened = false;
                    triggerOverview();
                })
            );
        });
    }
function initMap ( ) { dummyData = initData ( ) ; var $ul = $ ( 'ul.striped-list' ) . empty ( ) ; map = dummyData . countries . Russia . createMap ( '#map' ) . on ( 'click' , function ( ) { overviewOpened = true ; triggerOverview ( ) ; } ) ; Object . keys ( dummyData . countries ) . map ( function ( countryName , index ) { var country = dummyData . countries [ countryName ] ; var marker = country . createMarker ( map ) . on ( 'click' , function ( ) { outputOverview ( country ) ; overviewOpened = false ; triggerOverview ( ) ; } ) ; $ul . append ( $ ( '<li/>' , { 'class' : 'striped-list-item' , 'data-overview-toggle' : '' } ) . append ( $ ( '<span/>' , { 'class' : 'striped-list-item__index' , 'html' : index + 1 } ) ) . append ( $ ( '<img/>' , { 'class' : 'striped-list-item__flag' } ) . attr ( 'src' , 'img/flags/' + country . data ( 'code' ) + '.png' ) . attr ( 'alt' , country . data ( 'name' ) ) ) . append ( $ ( '<span/>' , { 'class' : 'striped-list-item__name' , 'html' : country . data ( 'name' ) } ) ) . on ( 'mouseover' , function ( ) { map . panTo ( country ) ; marker . infoWindow . show ( ) ; } ) . on ( 'click' , function ( ) { outputOverview ( country ) ; overviewOpened = false ; triggerOverview ( ) ; } ) ) ; } ) ; }
Map initialization (Google Maps callback function)
Map initialization ( Google Maps callback function )
/**
         * Block containing countries data
         */ /**
         * Create map with center at Russia
         */ /**
             * Close overview window while click on map
             */ /**
         * Filling countries data
         */ /**
             * Create map marker for each country
             */ /**
                     * Scroll map to country marker and show marker info window
                     */ /**
                     * Open overview window with country data
                     */