static/scripts.js
// Add marker for place to map
Add marker for place to map
Add marker for place to map
function addMarker(place) {
    var marker = new google.maps.Marker({
        position: {
            lat: parseFloat(place.Latitude_Val),
            lng: parseFloat(place.Longitude_Val)
        },
        map: map,
        labelOrigin: new google.maps.Point(16, 64),
        label: {
            text: place.IATA_Code
        }
    });
    marker.addListener('click', function() {
        info.setContent("Loading..."); 
        var contentString = '<b>' + place.Airport_Name + '</b>';
        contentString = contentString + '<br><b>IATA Code:</b> ' + place.IATA_Code + '';
        contentString = contentString + '<br><b>Serves:</b> ' + place.Serves + '';
        contentString = contentString + '<br><b>Location:</b> ' + place.Location + '';
        info.setContent(contentString);
        info.open(map, marker);
        if (connectionmode == false) {
            showroutes(place);
        };
    });
    markers.push(marker);
    marker.setMap(map);
}
function addMarker ( place ) { var marker = new google . maps . Marker ( { position : { lat : parseFloat ( place . Latitude_Val ) , lng : parseFloat ( place . Longitude_Val ) } , map : map , labelOrigin : new google . maps . Point ( 16 , 64 ) , label : { text : place . IATA_Code } } ) ; marker . addListener ( 'click' , function ( ) { info . setContent ( "Loading..." ) ; var contentString = '<b>' + place . Airport_Name + '</b>' ; contentString = contentString + '<br><b>IATA Code:</b> ' + place . IATA_Code + '' ; contentString = contentString + '<br><b>Serves:</b> ' + place . Serves + '' ; contentString = contentString + '<br><b>Location:</b> ' + place . Location + '' ; info . setContent ( contentString ) ; info . open ( map , marker ) ; if ( connectionmode == false ) { showroutes ( place ) ; } ; } ) ; markers . push ( marker ) ; marker . setMap ( map ) ; }
Add marker for place to map
Add marker for place to map
//Declare and add a new marker //Listener that wait for the marker to be clicked //Temp message until the rest loads //Display the details of the airport