Finally managed to get javascript working with google map