javascript for AFA map