get api bus-route by ajax

get api data by proxy.
modify js for ajax. query
PHP function is closure, it need "global" to get global variable.