static/scripts.js
//Show all connecting airports from selected airport
Show all connecting airports from selected airport
Show all connecting airports from selected airport
function showroutes(place) {
    connectionmode = true;
    let parameters = {
        id: place.id,
        star: document.getElementById("star").checked,
        ow: document.getElementById("ow").checked,
        sky: document.getElementById("sky").checked
    };
    $.getJSON("/routesearch", parameters, function(data, textStatus, jqXHR) {
        removeMarkers();
        addMarker(place);
        for (let i = 0; i < data.length; i++) {
            addConnectingMarker(data[i]);   
        }
        if (map.zoom > 5) {
            map.setZoom(5);
        }
        document.getElementById("removeconnections").style.visibility = "visible";
        document.getElementById("star").disabled = true;
        document.getElementById("ow").disabled = true;
        document.getElementById("sky").disabled = true;
    });
}
function showroutes ( place ) { connectionmode = true ; let parameters = { id : place . id , star : document . getElementById ( "star" ) . checked , ow : document . getElementById ( "ow" ) . checked , sky : document . getElementById ( "sky" ) . checked } ; $ . getJSON ( "/routesearch" , parameters , function ( data , textStatus , jqXHR ) { removeMarkers ( ) ; addMarker ( place ) ; for ( let i = 0 ; i < data . length ; i ++ ) { addConnectingMarker ( data [ i ] ) ; } if ( map . zoom > 5 ) { map . setZoom ( 5 ) ; } document . getElementById ( "removeconnections" ) . style . visibility = "visible" ; document . getElementById ( "star" ) . disabled = true ; document . getElementById ( "ow" ) . disabled = true ; document . getElementById ( "sky" ) . disabled = true ; } ) ; }
Show all connecting airports from selected airport
Show all connecting airports from selected airport
// Call typeahead's callback with search results (i.e., places) // Add connecting markers to map //'Connecting markers' are different from regular markers