static/scripts.js
// Search database for typeahead's suggestions
Search database for typeahead's suggestions
Search database for typeahead ' s suggestions
function search(query, syncResults, asyncResults) {
    let parameters = {
        q: query
    };
    $.getJSON("/search", parameters, function(data, textStatus, jqXHR) {
        asyncResults(data);
        map.setZoom(11);
    });
}
function search ( query , syncResults , asyncResults ) { let parameters = { q : query } ; $ . getJSON ( "/search" , parameters , function ( data , textStatus , jqXHR ) { asyncResults ( data ) ; map . setZoom ( 11 ) ; } ) ; }
Search database for typeahead's suggestions
Search database for typeahead ' s suggestions
// Get places matching query (asynchronously) // Call typeahead's callback with search results (i.e., places)