Moving the google maps javascript to the controller