function createMap(){
    map = new google.maps.Map(document.getElementById('map'), {
        center: { lat: 37.422, lng: -122.084 }, 
        zoom:10,
        // Enables dark mode view
        styles: [
            {elementType: 'geometry', stylers: [{color: '#242f3e'}]},
            {elementType: 'labels.text.stroke', stylers: [{color: '#242f3e'}]},
            {elementType: 'labels.text.fill', stylers: [{color: '#746855'}]},
            {
              featureType: 'administrative.locality',
              elementType: 'labels.text.fill',
              stylers: [{color: '#d59563'}]
            },
            {
              featureType: 'poi',
              elementType: 'labels.text.fill',
              stylers: [{color: '#d59563'}]
            },
            {
              featureType: 'poi.park',
              elementType: 'geometry',
              stylers: [{color: '#263c3f'}]
            },
            {
              featureType: 'poi.park',
              elementType: 'labels.text.fill',
              stylers: [{color: '#6b9a76'}]
            },
            {
              featureType: 'road',
              elementType: 'geometry',
              stylers: [{color: '#38414e'}]
            },
            {
              featureType: 'road',
              elementType: 'geometry.stroke',
              stylers: [{color: '#212a37'}]
            },
            {
              featureType: 'road',
              elementType: 'labels.text.fill',
              stylers: [{color: '#9ca5b3'}]
            },
            {
              featureType: 'road.highway',
              elementType: 'geometry',
              stylers: [{color: '#746855'}]
            },
            {
              featureType: 'road.highway',
              elementType: 'geometry.stroke',
              stylers: [{color: '#1f2835'}]
            },
            {
              featureType: 'road.highway',
              elementType: 'labels.text.fill',
              stylers: [{color: '#f3d19c'}]
            },
            {
              featureType: 'transit',
              elementType: 'geometry',
              stylers: [{color: '#2f3948'}]
            },
            {
              featureType: 'transit.station',
              elementType: 'labels.text.fill',
              stylers: [{color: '#d59563'}]
            },
            {
              featureType: 'water',
              elementType: 'geometry',
              stylers: [{color: '#17263c'}]
            },
            {
              featureType: 'water',
              elementType: 'labels.text.fill',
              stylers: [{color: '#515c6d'}]
            },
            {
              featureType: 'water',
              elementType: 'labels.text.stroke',
              stylers: [{color: '#17263c'}]
            }
          ]
        });

    map.setTilt(45);

    var contentMexico = '<div id="info-window">'+
        '<h1>Xcaret Mexico</h1>'+
        '<p><b>Xcaret</b> is one of greatest nature parks. '+
        'Here you can find underground rivers, the caribbean '+
        'and Mexico\'s culture.</p>'+
        '<a href="https://www.xcaret.com/en/?langRedirect=1">Attribution: Xcaret by Mexico</a>'+
        '</div>';

    var contentChicago = '<div id="info-window">'+
        '<h1>Museum of Science and Industry</h1>'+
        '<p><b>Museum of Science and Industry in Chicago</b>, one of the largest '+
        'museums in the world. It inspires people to pursue science careers and it'+
        'is the home of more than 35,000 artifacts.</p>'+
        '<a href="https://www.msichicago.org/">Attribution: Museum of Science and Industry</a>'+
        '</div>';

    var markerMexico = createMarkerForDisplay(20.5809134,-87.1218867,contentMexico);
    var markerChicago = createMarkerForDisplay( 41.8028818,-87.5852623, contentChicago);

    /** When the user clicks in the map, show a marker with a text box the user can edit. */
    map.addListener('click',(event) => {
        createMarkerForEdit(event.latLng.lat(), event.latLng.lng());
    });

    fetchMarkers();
}
/** Creates a map and adds it to the page. */
Creates a map and adds it to the page.
Creates a map and adds it to the page .
function createMap(){
    map = new google.maps.Map(document.getElementById('map'), {
        center: { lat: 37.422, lng: -122.084 }, 
        zoom:10,
        styles: [
            {elementType: 'geometry', stylers: [{color: '#242f3e'}]},
            {elementType: 'labels.text.stroke', stylers: [{color: '#242f3e'}]},
            {elementType: 'labels.text.fill', stylers: [{color: '#746855'}]},
            {
              featureType: 'administrative.locality',
              elementType: 'labels.text.fill',
              stylers: [{color: '#d59563'}]
            },
            {
              featureType: 'poi',
              elementType: 'labels.text.fill',
              stylers: [{color: '#d59563'}]
            },
            {
              featureType: 'poi.park',
              elementType: 'geometry',
              stylers: [{color: '#263c3f'}]
            },
            {
              featureType: 'poi.park',
              elementType: 'labels.text.fill',
              stylers: [{color: '#6b9a76'}]
            },
            {
              featureType: 'road',
              elementType: 'geometry',
              stylers: [{color: '#38414e'}]
            },
            {
              featureType: 'road',
              elementType: 'geometry.stroke',
              stylers: [{color: '#212a37'}]
            },
            {
              featureType: 'road',
              elementType: 'labels.text.fill',
              stylers: [{color: '#9ca5b3'}]
            },
            {
              featureType: 'road.highway',
              elementType: 'geometry',
              stylers: [{color: '#746855'}]
            },
            {
              featureType: 'road.highway',
              elementType: 'geometry.stroke',
              stylers: [{color: '#1f2835'}]
            },
            {
              featureType: 'road.highway',
              elementType: 'labels.text.fill',
              stylers: [{color: '#f3d19c'}]
            },
            {
              featureType: 'transit',
              elementType: 'geometry',
              stylers: [{color: '#2f3948'}]
            },
            {
              featureType: 'transit.station',
              elementType: 'labels.text.fill',
              stylers: [{color: '#d59563'}]
            },
            {
              featureType: 'water',
              elementType: 'geometry',
              stylers: [{color: '#17263c'}]
            },
            {
              featureType: 'water',
              elementType: 'labels.text.fill',
              stylers: [{color: '#515c6d'}]
            },
            {
              featureType: 'water',
              elementType: 'labels.text.stroke',
              stylers: [{color: '#17263c'}]
            }
          ]
        });
    map.setTilt(45);
    var contentMexico = '<div id="info-window">'+
        '<h1>Xcaret Mexico</h1>'+
        '<p><b>Xcaret</b> is one of greatest nature parks. '+
        'Here you can find underground rivers, the caribbean '+
        'and Mexico\'s culture.</p>'+
        '<a href="https://www.xcaret.com/en/?langRedirect=1">Attribution: Xcaret by Mexico</a>'+
        '</div>';
    var contentChicago = '<div id="info-window">'+
        '<h1>Museum of Science and Industry</h1>'+
        '<p><b>Museum of Science and Industry in Chicago</b>, one of the largest '+
        'museums in the world. It inspires people to pursue science careers and it'+
        'is the home of more than 35,000 artifacts.</p>'+
        '<a href="https://www.msichicago.org/">Attribution: Museum of Science and Industry</a>'+
        '</div>';
    var markerMexico = createMarkerForDisplay(20.5809134,-87.1218867,contentMexico);
    var markerChicago = createMarkerForDisplay( 41.8028818,-87.5852623, contentChicago);
    map.addListener('click',(event) => {
        createMarkerForEdit(event.latLng.lat(), event.latLng.lng());
    });
    fetchMarkers();
}
function createMap ( ) { map = new google . maps . Map ( document . getElementById ( 'map' ) , { center : { lat : 37.422 , lng : - 122.084 } , zoom : 10 , styles : [ { elementType : 'geometry' , stylers : [ { color : '#242f3e' } ] } , { elementType : 'labels.text.stroke' , stylers : [ { color : '#242f3e' } ] } , { elementType : 'labels.text.fill' , stylers : [ { color : '#746855' } ] } , { featureType : 'administrative.locality' , elementType : 'labels.text.fill' , stylers : [ { color : '#d59563' } ] } , { featureType : 'poi' , elementType : 'labels.text.fill' , stylers : [ { color : '#d59563' } ] } , { featureType : 'poi.park' , elementType : 'geometry' , stylers : [ { color : '#263c3f' } ] } , { featureType : 'poi.park' , elementType : 'labels.text.fill' , stylers : [ { color : '#6b9a76' } ] } , { featureType : 'road' , elementType : 'geometry' , stylers : [ { color : '#38414e' } ] } , { featureType : 'road' , elementType : 'geometry.stroke' , stylers : [ { color : '#212a37' } ] } , { featureType : 'road' , elementType : 'labels.text.fill' , stylers : [ { color : '#9ca5b3' } ] } , { featureType : 'road.highway' , elementType : 'geometry' , stylers : [ { color : '#746855' } ] } , { featureType : 'road.highway' , elementType : 'geometry.stroke' , stylers : [ { color : '#1f2835' } ] } , { featureType : 'road.highway' , elementType : 'labels.text.fill' , stylers : [ { color : '#f3d19c' } ] } , { featureType : 'transit' , elementType : 'geometry' , stylers : [ { color : '#2f3948' } ] } , { featureType : 'transit.station' , elementType : 'labels.text.fill' , stylers : [ { color : '#d59563' } ] } , { featureType : 'water' , elementType : 'geometry' , stylers : [ { color : '#17263c' } ] } , { featureType : 'water' , elementType : 'labels.text.fill' , stylers : [ { color : '#515c6d' } ] } , { featureType : 'water' , elementType : 'labels.text.stroke' , stylers : [ { color : '#17263c' } ] } ] } ) ; map . setTilt ( 45 ) ; var contentMexico = '<div id="info-window">' + '<h1>Xcaret Mexico</h1>' + '<p><b>Xcaret</b> is one of greatest nature parks. ' + 'Here you can find underground rivers, the caribbean ' + 'and Mexico\'s culture.</p>' + '<a href="https://www.xcaret.com/en/?langRedirect=1">Attribution: Xcaret by Mexico</a>' + '</div>' ; var contentChicago = '<div id="info-window">' + '<h1>Museum of Science and Industry</h1>' + '<p><b>Museum of Science and Industry in Chicago</b>, one of the largest ' + 'museums in the world. It inspires people to pursue science careers and it' + 'is the home of more than 35,000 artifacts.</p>' + '<a href="https://www.msichicago.org/">Attribution: Museum of Science and Industry</a>' + '</div>' ; var markerMexico = createMarkerForDisplay ( 20.5809134 , - 87.1218867 , contentMexico ) ; var markerChicago = createMarkerForDisplay ( 41.8028818 , - 87.5852623 , contentChicago ) ; map . addListener ( 'click' , ( event ) => { createMarkerForEdit ( event . latLng . lat ( ) , event . latLng . lng ( ) ) ; } ) ; fetchMarkers ( ) ; }
Creates a map and adds it to the page.
Creates a map and adds it to the page .
// Enables dark mode view /** When the user clicks in the map, show a marker with a text box the user can edit. */