fixed basic funcationality of map by moving js foundation call to run last
fixed basic funcationality of map by moving js foundation call to run last